本文整理了Java中org.apache.cloudstack.engine.subsystem.api.storage.DataStore.delete()
方法的一些代码示例,展示了DataStore.delete()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。DataStore.delete()
方法的具体详情如下:
包路径:org.apache.cloudstack.engine.subsystem.api.storage.DataStore
类名称:DataStore
方法名:delete
暂无
代码示例来源:origin: apache/cloudstack
@Override
public boolean delete() {
if (dataStore != null) {
return dataStore.delete(this);
}
return true;
}
代码示例来源:origin: apache/cloudstack
@Override
public boolean delete() {
if (dataStore != null) {
return dataStore.delete(this);
}
return true;
}
代码示例来源:origin: apache/cloudstack
@Override
public boolean delete() {
if (store != null) {
return store.delete(this);
}
return true;
}
代码示例来源:origin: apache/cloudstack
@Override
public boolean deleteCacheObject(DataObject data) {
return data.getDataStore().delete(data);
}
}
代码示例来源:origin: apache/cloudstack
protected AsyncCallFuture<VolumeApiResult> copyVolumeFromPrimaryToImage(VolumeInfo srcVolume, DataStore destStore) {
AsyncCallFuture<VolumeApiResult> future = new AsyncCallFuture<VolumeApiResult>();
VolumeApiResult res = new VolumeApiResult(srcVolume);
VolumeInfo destVolume = null;
try {
destVolume = (VolumeInfo)destStore.create(srcVolume);
srcVolume.processEvent(Event.MigrationRequested); // this is just used for locking that src volume record in DB to avoid using lock
destVolume.processEventOnly(Event.CreateOnlyRequested);
CopyVolumeContext<VolumeApiResult> context = new CopyVolumeContext<VolumeApiResult>(null, future, srcVolume, destVolume, destStore);
AsyncCallbackDispatcher<VolumeServiceImpl, CopyCommandResult> caller = AsyncCallbackDispatcher.create(this);
caller.setCallback(caller.getTarget().copyVolumeFromPrimaryToImageCallback(null, null)).setContext(context);
motionSrv.copyAsync(srcVolume, destVolume, caller);
return future;
} catch (Exception e) {
s_logger.error("failed to copy volume to image store", e);
if (destVolume != null) {
destVolume.getDataStore().delete(destVolume);
}
srcVolume.processEvent(Event.OperationFailed); // unlock source volume record
res.setResult(e.toString());
future.complete(res);
return future;
}
}
代码示例来源:origin: apache/cloudstack
protected Void copyVolumeFromImageToPrimaryCallback(AsyncCallbackDispatcher<VolumeServiceImpl, CopyCommandResult> callback, CopyVolumeContext<VolumeApiResult> context) {
VolumeInfo srcVolume = context.srcVolume;
VolumeInfo destVolume = context.destVolume;
CopyCommandResult result = callback.getResult();
AsyncCallFuture<VolumeApiResult> future = context.future;
VolumeApiResult res = new VolumeApiResult(destVolume);
try {
if (result.isFailed()) {
destVolume.processEvent(Event.OperationFailed);
srcVolume.processEvent(Event.OperationFailed);
res.setResult(result.getResult());
future.complete(res);
return null;
}
srcVolume.processEvent(Event.OperationSuccessed);
destVolume.processEvent(Event.OperationSuccessed, result.getAnswer());
srcVolume.getDataStore().delete(srcVolume);
future.complete(res);
} catch (Exception e) {
res.setResult(e.toString());
future.complete(res);
}
return null;
}
内容来源于网络,如有侵权,请联系作者删除!