if (executionModeSynch == null)
executionModeSynch = iMode == 0;
if (executionModeSynch) {
// REPLICATE IT
final Object result = dManager.sendRequest(getName(), Collections.singleton(clusterName), nodes, new ODeleteRecordTask(
iRecordId, iVersion), EXECUTION_MODE.RESPONSE);
if (result instanceof ONeedRetryException)
throw (ONeedRetryException) result;
else if (result instanceof Throwable)
throw new ODistributedException("Error on execution distributed DELETE_RECORD", (Throwable) result);
return new OStorageOperationResult<Boolean>(true);
}
final OStorageOperationResult<Boolean> localResult = wrapped.deleteRecord(iRecordId, iVersion, iMode, iCallback);
nodes.remove(0);
if (!nodes.isEmpty())
asynchronousExecution(new OAsynchDistributedOperation(getName(), Collections.singleton(clusterName), nodes,
new ODeleteRecordTask(iRecordId, iVersion)));
return localResult;
} catch (ONeedRetryException e) {
// PASS THROUGH