Search in sources :

Example 1 with PreJoinAwareService

use of com.hazelcast.internal.services.PreJoinAwareService in project hazelcast by hazelcast.

the class NodeEngineImpl method getPreJoinOperations.

public Collection<Operation> getPreJoinOperations() {
    Collection<Operation> preJoinOps = new LinkedList<>();
    Collection<PreJoinAwareService> services = getServices(PreJoinAwareService.class);
    for (PreJoinAwareService service : services) {
        Operation preJoinOperation = service.getPreJoinOperation();
        if (preJoinOperation != null) {
            if (preJoinOperation.getPartitionId() >= 0) {
                logger.severe("Pre-join operations operations should not have partition ID set! Service: " + service + ", Operation: " + preJoinOperation);
                continue;
            }
            preJoinOps.add(preJoinOperation);
        }
    }
    return preJoinOps;
}
Also used : PreJoinAwareService(com.hazelcast.internal.services.PreJoinAwareService) PartitionAwareOperation(com.hazelcast.spi.impl.operationservice.PartitionAwareOperation) Operation(com.hazelcast.spi.impl.operationservice.Operation) LinkedList(java.util.LinkedList)

Aggregations

PreJoinAwareService (com.hazelcast.internal.services.PreJoinAwareService)1 Operation (com.hazelcast.spi.impl.operationservice.Operation)1 PartitionAwareOperation (com.hazelcast.spi.impl.operationservice.PartitionAwareOperation)1 LinkedList (java.util.LinkedList)1