public void onFailure(Throwable t) {
}
};
for (int i = 0; i < k; i++) {
final HazelcastInstance instance = instances[i];
final IExecutorService service = instance.getExecutorService("testSubmitToKeyOwnerCallable");
final String script = "hazelcast.getCluster().getLocalMember().getUuid().equals(memberUUID)";
final HashMap map = new HashMap();
final Member localMember = instance.getCluster().getLocalMember();
map.put("memberUUID", localMember.getUuid());
int key = 0;
while (!localMember.equals(instance.getPartitionService().getPartition(++key).getOwner())) ;
if (i % 2 == 0) {
final Future f = service.submitToKeyOwner(new ScriptCallable(script, map), key);
assertTrue((Boolean) f.get(60, TimeUnit.SECONDS));
} else {
service.submitToKeyOwner(new ScriptCallable(script, map), key, callback);
}
}
assertOpenEventually(latch);
assertEquals(k / 2, count.get());
}