List<CacheEntryListenerInvocation<K, V>> listenerInvocations) {
for (CacheEntryListenerInvocation<K, V> listener : listenerInvocations) {
if (!enlistedAlready.contains(listener.getTarget())) {
// If clustered means it is local - so use our address
if (listener.isClustered()) {
callables.add(new ClusterListenerReplicateCallable(listener.getIdentifier(),
cache.getCacheManager().getAddress(), listener.getFilter(),
listener.getConverter()));
enlistedAlready.add(listener.getTarget());
}
else if (listener.getTarget() instanceof RemoteClusterListener) {
RemoteClusterListener lcl = (RemoteClusterListener)listener.getTarget();
callables.add(new ClusterListenerReplicateCallable(lcl.getId(), lcl.getOwnerAddress(), listener.getFilter(),
listener.getConverter()));
enlistedAlready.add(listener.getTarget());
}
}
}