@Override
public Object call()
throws Exception {
final ClientEndpoint endpoint = getEndpoint();
final ReplicatedRecordStore replicatedRecordStore = getReplicatedRecordStore();
final EntryListener<Object, Object> listener = new ClientReplicatedMapEntryListener();
String registrationId;
if (predicate == null) {
registrationId = replicatedRecordStore.addEntryListener(listener, key);
} else {
registrationId = replicatedRecordStore.addEntryListener(listener, predicate, key);
}
endpoint.setListenerRegistration(ReplicatedMapService.SERVICE_NAME, getMapName(), registrationId);
return registrationId;
}