Search in sources :

Example 1 with ProxyService

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

the class CheckAndEvictOperation method run.

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

Example 2 with ProxyService

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

the class CreateProxyMessageTask method getRequiredPermission.

@Override
public Permission getRequiredPermission() {
    ProxyService proxyService = clientEngine.getProxyService();
    Collection<String> distributedObjectNames = proxyService.getDistributedObjectNames(parameters.serviceName);
    if (distributedObjectNames.contains(parameters.name)) {
        return null;
    }
    return ActionConstants.getPermission(parameters.name, parameters.serviceName, ActionConstants.ACTION_CREATE);
}
Also used : ProxyService(com.hazelcast.spi.ProxyService)

Example 3 with ProxyService

use of com.hazelcast.spi.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();
    DistributedObject distributedObject = proxyService.getDistributedObject(SERVICE_NAME, parameters.name);
    MapProxyImpl mapProxy = (MapProxyImpl) distributedObject;
    mapProxy.flush();
    return null;
}
Also used : NodeEngine(com.hazelcast.spi.NodeEngine) DistributedObject(com.hazelcast.core.DistributedObject) ProxyService(com.hazelcast.spi.ProxyService) MapProxyImpl(com.hazelcast.map.impl.proxy.MapProxyImpl) MapService(com.hazelcast.map.impl.MapService) MapServiceContext(com.hazelcast.map.impl.MapServiceContext)

Example 4 with ProxyService

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

the class TimedMemberStateFactoryHelper method registerJMXBeans.

static void registerJMXBeans(HazelcastInstanceImpl instance, MemberStateImpl memberState) {
    final EventService es = instance.node.nodeEngine.getEventService();
    final InternalOperationService os = instance.node.nodeEngine.getOperationService();
    final ConnectionManager cm = instance.node.connectionManager;
    final InternalPartitionService ps = instance.node.partitionService;
    final ProxyService proxyService = instance.node.nodeEngine.getProxyService();
    final ExecutionService executionService = instance.node.nodeEngine.getExecutionService();
    final MXBeansDTO beans = new MXBeansDTO();
    final EventServiceDTO esBean = new EventServiceDTO(es);
    beans.setEventServiceBean(esBean);
    final OperationServiceDTO osBean = new OperationServiceDTO(os);
    beans.setOperationServiceBean(osBean);
    final ConnectionManagerDTO cmBean = new ConnectionManagerDTO(cm);
    beans.setConnectionManagerBean(cmBean);
    final PartitionServiceBeanDTO psBean = new PartitionServiceBeanDTO(ps, instance);
    beans.setPartitionServiceBean(psBean);
    final ProxyServiceDTO proxyServiceBean = new ProxyServiceDTO(proxyService);
    beans.setProxyServiceBean(proxyServiceBean);
    final ManagedExecutorService systemExecutor = executionService.getExecutor(ExecutionService.SYSTEM_EXECUTOR);
    final ManagedExecutorService asyncExecutor = executionService.getExecutor(ExecutionService.ASYNC_EXECUTOR);
    final ManagedExecutorService scheduledExecutor = executionService.getExecutor(ExecutionService.SCHEDULED_EXECUTOR);
    final ManagedExecutorService clientExecutor = executionService.getExecutor(ExecutionService.CLIENT_EXECUTOR);
    final ManagedExecutorService queryExecutor = executionService.getExecutor(ExecutionService.QUERY_EXECUTOR);
    final ManagedExecutorService ioExecutor = executionService.getExecutor(ExecutionService.IO_EXECUTOR);
    final ManagedExecutorDTO systemExecutorDTO = new ManagedExecutorDTO(systemExecutor);
    final ManagedExecutorDTO asyncExecutorDTO = new ManagedExecutorDTO(asyncExecutor);
    final ManagedExecutorDTO scheduledExecutorDTO = new ManagedExecutorDTO(scheduledExecutor);
    final ManagedExecutorDTO clientExecutorDTO = new ManagedExecutorDTO(clientExecutor);
    final ManagedExecutorDTO queryExecutorDTO = new ManagedExecutorDTO(queryExecutor);
    final ManagedExecutorDTO ioExecutorDTO = new ManagedExecutorDTO(ioExecutor);
    beans.putManagedExecutor(ExecutionService.SYSTEM_EXECUTOR, systemExecutorDTO);
    beans.putManagedExecutor(ExecutionService.ASYNC_EXECUTOR, asyncExecutorDTO);
    beans.putManagedExecutor(ExecutionService.SCHEDULED_EXECUTOR, scheduledExecutorDTO);
    beans.putManagedExecutor(ExecutionService.CLIENT_EXECUTOR, clientExecutorDTO);
    beans.putManagedExecutor(ExecutionService.QUERY_EXECUTOR, queryExecutorDTO);
    beans.putManagedExecutor(ExecutionService.IO_EXECUTOR, ioExecutorDTO);
    memberState.setBeans(beans);
}
Also used : InternalPartitionService(com.hazelcast.internal.partition.InternalPartitionService) EventService(com.hazelcast.spi.EventService) InternalOperationService(com.hazelcast.spi.impl.operationservice.InternalOperationService) ExecutionService(com.hazelcast.spi.ExecutionService) EventServiceDTO(com.hazelcast.internal.management.dto.EventServiceDTO) MXBeansDTO(com.hazelcast.internal.management.dto.MXBeansDTO) ManagedExecutorDTO(com.hazelcast.internal.management.dto.ManagedExecutorDTO) ConnectionManagerDTO(com.hazelcast.internal.management.dto.ConnectionManagerDTO) ManagedExecutorService(com.hazelcast.util.executor.ManagedExecutorService) ConnectionManager(com.hazelcast.nio.ConnectionManager) ProxyService(com.hazelcast.spi.ProxyService) PartitionServiceBeanDTO(com.hazelcast.internal.management.dto.PartitionServiceBeanDTO) OperationServiceDTO(com.hazelcast.internal.management.dto.OperationServiceDTO) ProxyServiceDTO(com.hazelcast.internal.management.dto.ProxyServiceDTO)

Example 5 with ProxyService

use of com.hazelcast.spi.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);
}
Also used : ProxyService(com.hazelcast.spi.ProxyService)

Aggregations

ProxyService (com.hazelcast.spi.ProxyService)8 QueueContainer (com.hazelcast.collection.impl.queue.QueueContainer)1 DistributedObject (com.hazelcast.core.DistributedObject)1 ConnectionManagerDTO (com.hazelcast.internal.management.dto.ConnectionManagerDTO)1 EventServiceDTO (com.hazelcast.internal.management.dto.EventServiceDTO)1 MXBeansDTO (com.hazelcast.internal.management.dto.MXBeansDTO)1 ManagedExecutorDTO (com.hazelcast.internal.management.dto.ManagedExecutorDTO)1 OperationServiceDTO (com.hazelcast.internal.management.dto.OperationServiceDTO)1 PartitionServiceBeanDTO (com.hazelcast.internal.management.dto.PartitionServiceBeanDTO)1 ProxyServiceDTO (com.hazelcast.internal.management.dto.ProxyServiceDTO)1 InternalPartitionService (com.hazelcast.internal.partition.InternalPartitionService)1 MapService (com.hazelcast.map.impl.MapService)1 MapServiceContext (com.hazelcast.map.impl.MapServiceContext)1 MapProxyImpl (com.hazelcast.map.impl.proxy.MapProxyImpl)1 ConnectionManager (com.hazelcast.nio.ConnectionManager)1 EventService (com.hazelcast.spi.EventService)1 ExecutionService (com.hazelcast.spi.ExecutionService)1 NodeEngine (com.hazelcast.spi.NodeEngine)1 InternalOperationService (com.hazelcast.spi.impl.operationservice.InternalOperationService)1 ManagedExecutorService (com.hazelcast.util.executor.ManagedExecutorService)1