Search in sources :

Example 1 with ProxyService

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

the class AbstractDistributedObject method destroy.

@Override
public final void destroy() {
    if (preDestroy()) {
        NodeEngine engine = getNodeEngine();
        ProxyService proxyService = engine.getProxyService();
        UUID source = engine.getLocalMember().getUuid();
        proxyService.destroyDistributedObject(getServiceName(), getDistributedObjectName(), source);
        postDestroy();
    }
}
Also used : ProxyService(com.hazelcast.spi.impl.proxyservice.ProxyService) UUID(java.util.UUID)

Example 2 with ProxyService

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

the class InitializeDistributedObjectOperation method run.

@Override
public void run() throws Exception {
    ProxyService proxyService = getNodeEngine().getProxyService();
    proxyService.initializeDistributedObject(serviceName, name, getCallerUuid());
}
Also used : ProxyService(com.hazelcast.spi.impl.proxyservice.ProxyService)

Example 3 with ProxyService

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

the class MapFlushMessageTask method call.

@Override
protected Object call() throws Exception {
    MapService mapService = getService(SERVICE_NAME);
    MapServiceContext mapServiceContext = mapService.getMapServiceContext();
    NodeEngine nodeEngine = mapServiceContext.getNodeEngine();
    ProxyService proxyService = nodeEngine.getProxyService();
    UUID source = endpoint.getUuid();
    DistributedObject distributedObject = proxyService.getDistributedObject(SERVICE_NAME, parameters, source);
    MapProxyImpl mapProxy = (MapProxyImpl) distributedObject;
    mapProxy.flush();
    return null;
}
Also used : NodeEngine(com.hazelcast.spi.impl.NodeEngine) DistributedObject(com.hazelcast.core.DistributedObject) ProxyService(com.hazelcast.spi.impl.proxyservice.ProxyService) MapProxyImpl(com.hazelcast.map.impl.proxy.MapProxyImpl) MapService(com.hazelcast.map.impl.MapService) UUID(java.util.UUID) MapServiceContext(com.hazelcast.map.impl.MapServiceContext)

Example 4 with ProxyService

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

the class CheckAndEvictOperation method run.

@Override
public void run() throws Exception {
    final QueueContainer queueContainer = getContainer();
    if (queueContainer.isEvictable()) {
        NodeEngine nodeEngine = getNodeEngine();
        ProxyService proxyService = nodeEngine.getProxyService();
        UUID source = nodeEngine.getLocalMember().getUuid();
        proxyService.destroyDistributedObject(getServiceName(), name, source);
    }
}
Also used : NodeEngine(com.hazelcast.spi.impl.NodeEngine) ProxyService(com.hazelcast.spi.impl.proxyservice.ProxyService) QueueContainer(com.hazelcast.collection.impl.queue.QueueContainer) UUID(java.util.UUID)

Example 5 with ProxyService

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

the class HazelcastInstanceImpl method removeDistributedObjectListener.

@Override
public boolean removeDistributedObjectListener(@Nonnull UUID registrationId) {
    checkNotNull(registrationId, "Registration ID must not be null!");
    final ProxyService proxyService = node.getNodeEngine().getProxyService();
    return proxyService.removeProxyListener(registrationId);
}
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