use of com.ms.silverking.cloud.dht.NonExistenceResponse in project SilverKing by Morgan-Stanley.
the class AsyncRetrievalOperationImpl method isFailure.
@Override
protected boolean isFailure(OpResult result) {
switch(result) {
case MULTIPLE:
// multiple will only be called when checking completion of the entire operation
// others will be called key-by-key also
// filter no such value errors to allow for users to override
// all other failures result in a failure
NonExistenceResponse nonExistenceResponse;
nonExistenceResponse = getNonExistenceResponse();
for (OpResult _result : allResults) {
if (_result.hasFailed(nonExistenceResponse)) {
return true;
}
}
return false;
case TIMEOUT:
RetrievalOptions retrievalOptions;
retrievalOptions = retrievalOperation.retrievalOptions();
if (retrievalOptions.getWaitMode() == WaitMode.WAIT_FOR && ((WaitOptions) retrievalOptions).getTimeoutResponse() == TimeoutResponse.IGNORE) {
return false;
} else {
return result.hasFailed();
}
default:
return result.hasFailed(getNonExistenceResponse());
}
}
Aggregations