Search in sources :

Example 6 with ProxyService

use of com.hazelcast.spi.impl.proxyservice.ProxyService in project hazelcast by hazelcast.

the class AddDistributedObjectListenerMessageTask method call.

@Override
protected Object call() throws Exception {
    final ProxyService proxyService = clientEngine.getProxyService();
    final UUID registrationId = proxyService.addProxyListener(this);
    endpoint.addDestroyAction(registrationId, (Callable) () -> proxyService.removeProxyListener(registrationId));
    return registrationId;
}
Also used : ProxyService(com.hazelcast.spi.impl.proxyservice.ProxyService) UUID(java.util.UUID)

Example 7 with ProxyService

use of com.hazelcast.spi.impl.proxyservice.ProxyService in project hazelcast by hazelcast.

the class HazelcastInstanceImpl method getDistributedObject.

@Nonnull
@Override
@SuppressWarnings("unchecked")
public <T extends DistributedObject> T getDistributedObject(@Nonnull String serviceName, @Nonnull String name) {
    ProxyService proxyService = node.getNodeEngine().getProxyService();
    UUID source = node.nodeEngine.getLocalMember().getUuid();
    return (T) proxyService.getDistributedObject(serviceName, name, source);
}
Also used : ProxyService(com.hazelcast.spi.impl.proxyservice.ProxyService) UUID(java.util.UUID) Nonnull(javax.annotation.Nonnull)

Example 8 with ProxyService

use of com.hazelcast.spi.impl.proxyservice.ProxyService in project hazelcast by hazelcast.

the class HazelcastInstanceImpl method addDistributedObjectListener.

@Override
public UUID addDistributedObjectListener(@Nonnull DistributedObjectListener distributedObjectListener) {
    checkNotNull(distributedObjectListener, "DistributedObjectListener must not be null!");
    final ProxyService proxyService = node.getNodeEngine().getProxyService();
    return proxyService.addProxyListener(distributedObjectListener);
}
Also used : ProxyService(com.hazelcast.spi.impl.proxyservice.ProxyService)

Aggregations

ProxyService (com.hazelcast.spi.impl.proxyservice.ProxyService)8 UUID (java.util.UUID)5 NodeEngine (com.hazelcast.spi.impl.NodeEngine)2 QueueContainer (com.hazelcast.collection.impl.queue.QueueContainer)1 DistributedObject (com.hazelcast.core.DistributedObject)1 MapService (com.hazelcast.map.impl.MapService)1 MapServiceContext (com.hazelcast.map.impl.MapServiceContext)1 MapProxyImpl (com.hazelcast.map.impl.proxy.MapProxyImpl)1 Nonnull (javax.annotation.Nonnull)1