Package com.hazelcast.util.executor

Examples of com.hazelcast.util.executor.StripedExecutor$Worker


    public WanReplicationService(NodeEngineImpl nodeEngine) {
        this.node = nodeEngine.getNode();
        this.logger = node.getLogger(WanReplicationService.class.getName());
        final ExecutionServiceImpl executionService = (ExecutionServiceImpl) nodeEngine.getExecutionService();
        this.executor = new StripedExecutor(
                executionService.getCachedExecutor(),
                ExecutorConfig.DEFAULT_POOL_SIZE,
                ExecutorConfig.DEFAULT_QUEUE_CAPACITY
        );
    }
View Full Code Here


        final Node node = nodeEngine.getNode();
        GroupProperties groupProperties = node.getGroupProperties();
        eventThreadCount = groupProperties.EVENT_THREAD_COUNT.getInteger();
        eventQueueCapacity = groupProperties.EVENT_QUEUE_CAPACITY.getInteger();
        eventQueueTimeoutMs = groupProperties.EVENT_QUEUE_TIMEOUT_MILLIS.getInteger();
        eventExecutor = new StripedExecutor(nodeEngine.executionService.getCachedExecutor(), eventThreadCount, eventQueueCapacity);
        segments = new ConcurrentHashMap<String, EventServiceSegment>();
    }
View Full Code Here

        final Node node = nodeEngine.getNode();
        GroupProperties groupProperties = node.getGroupProperties();
        this.eventThreadCount = groupProperties.EVENT_THREAD_COUNT.getInteger();
        this.eventQueueCapacity = groupProperties.EVENT_QUEUE_CAPACITY.getInteger();
        this.eventQueueTimeoutMs = groupProperties.EVENT_QUEUE_TIMEOUT_MILLIS.getInteger();
        this.eventExecutor = new StripedExecutor(
                node.getLogger(EventServiceImpl.class),
                node.getThreadNamePrefix("event"),
                node.threadGroup,
                eventThreadCount,
                eventQueueCapacity);
View Full Code Here

    private final StripedExecutor executor;

    public WanReplicationServiceImpl(Node node) {
        this.node = node;
        this.logger = node.getLogger(WanReplicationServiceImpl.class.getName());
        this.executor = new StripedExecutor(
                node.getLogger(WanReplicationServiceImpl.class),
                node.getThreadNamePrefix("wan"),
                node.threadGroup,
                ExecutorConfig.DEFAULT_POOL_SIZE,
                ExecutorConfig.DEFAULT_QUEUE_CAPACITY);
View Full Code Here

    public ClientListenerServiceImpl(HazelcastClient client, int eventThreadCount, int eventQueueCapacity) {
        this.connectionManager = client.getConnectionManager();
        this.serializationService = client.getSerializationService();
        this.invocationService = client.getInvocationService();
        this.eventExecutor = new StripedExecutor(logger, client.getName() + ".event",
                client.getThreadGroup(), eventThreadCount, eventQueueCapacity);
    }
View Full Code Here

        }
    }

    @Override
    public void handleEvent(final Packet packet) {
        StripedExecutor ex = getExecutor();
        ex.execute(new StripedRunnable() {
            @Override
            public void run() {
                final Data data = packet.getData();
                try {
                    WanReplicationEvent replicationEvent = (WanReplicationEvent) node.nodeEngine.toObject(data);
View Full Code Here

            }
        });
    }

    private StripedExecutor getExecutor() {
        StripedExecutor ex = executor;
        if (ex == null) {
            synchronized (mutex) {
                if (executor == null) {
                    executor = new StripedExecutor(node.getLogger(WanReplicationServiceImpl.class),
                            node.getThreadNamePrefix("wan"),
                            node.threadGroup, ExecutorConfig.DEFAULT_POOL_SIZE, ExecutorConfig.DEFAULT_QUEUE_CAPACITY);
                }
                ex = executor;
            }
View Full Code Here

                            wanReplicationEndpoint.shutdown();
                        }
                    }
                }
            }
            StripedExecutor ex = executor;
            if (ex != null) {
                ex.shutdown();
            }
            wanReplications.clear();
        }
    }
View Full Code Here

    public ClientListenerServiceImpl(HazelcastClientInstanceImpl client, int eventThreadCount, int eventQueueCapacity) {
        this.connectionManager = client.getConnectionManager();
        this.serializationService = client.getSerializationService();
        this.invocationService = client.getInvocationService();
        this.eventExecutor = new StripedExecutor(logger, client.getName() + ".event",
                client.getThreadGroup(), eventThreadCount, eventQueueCapacity);
    }
View Full Code Here

        final Node node = nodeEngine.getNode();
        GroupProperties groupProperties = node.getGroupProperties();
        this.eventThreadCount = groupProperties.EVENT_THREAD_COUNT.getInteger();
        this.eventQueueCapacity = groupProperties.EVENT_QUEUE_CAPACITY.getInteger();
        this.eventQueueTimeoutMs = groupProperties.EVENT_QUEUE_TIMEOUT_MILLIS.getInteger();
        this.eventExecutor = new StripedExecutor(
                node.getLogger(EventServiceImpl.class),
                node.getThreadNamePrefix("event"),
                node.threadGroup,
                eventThreadCount,
                eventQueueCapacity);
View Full Code Here

TOP

Related Classes of com.hazelcast.util.executor.StripedExecutor$Worker

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.