//TODO: We don't need to wait for all to complete, as soon as there is one future returning to false
//we can stop. Also there is no need to make use of isEmptyOperation; just use size. This reduces the
//amount of code.
Map<Integer, Object> results = nodeEngine.getOperationService()
.invokeOnAllPartitions(SERVICE_NAME,
new IsEmptyOperationFactory(name));
for (Object result : results.values()) {
if (!(Boolean) getService().getMapServiceContext().toObject(result)) {
return false;
}
}