Search in sources :

Example 66 with OperationService

use of com.hazelcast.spi.impl.operationservice.OperationService in project hazelcast by hazelcast.

the class ClusterServiceImpl method sendExplicitSuspicionTrigger.

void sendExplicitSuspicionTrigger(Address triggerTo, MembersViewMetadata endpointMembersViewMetadata) {
    if (triggerTo.equals(node.getThisAddress())) {
        logger.warning("Cannot send explicit suspicion trigger for " + endpointMembersViewMetadata + " to itself.");
        return;
    }
    int memberListVersion = membershipManager.getMemberListVersion();
    Operation op = new TriggerExplicitSuspicionOp(memberListVersion, endpointMembersViewMetadata);
    OperationService operationService = nodeEngine.getOperationService();
    operationService.send(op, triggerTo);
}
Also used : TriggerExplicitSuspicionOp(com.hazelcast.internal.cluster.impl.operations.TriggerExplicitSuspicionOp) Operation(com.hazelcast.spi.impl.operationservice.Operation) OperationService(com.hazelcast.spi.impl.operationservice.OperationService)

Example 67 with OperationService

use of com.hazelcast.spi.impl.operationservice.OperationService in project hazelcast by hazelcast.

the class LockEvictionProcessor method submit.

private void submit(UnlockOperation operation, Data key) {
    int partitionId = nodeEngine.getPartitionService().getPartitionId(key);
    OperationService operationService = nodeEngine.getOperationService();
    operation.setPartitionId(partitionId);
    operation.setOperationResponseHandler(unlockResponseHandler);
    operation.setValidateTarget(false);
    operation.setAsyncBackup(true);
    operationService.invokeOnTarget(SERVICE_NAME, operation, nodeEngine.getThisAddress());
}
Also used : OperationService(com.hazelcast.spi.impl.operationservice.OperationService)

Example 68 with OperationService

use of com.hazelcast.spi.impl.operationservice.OperationService in project hazelcast by hazelcast.

the class MapNearCacheManager method createRepairingInvalidationTask.

private RepairingTask createRepairingInvalidationTask() {
    ExecutionService executionService = nodeEngine.getExecutionService();
    ClusterService clusterService = nodeEngine.getClusterService();
    OperationService operationService = nodeEngine.getOperationService();
    HazelcastProperties properties = nodeEngine.getProperties();
    ILogger metadataFetcherLogger = nodeEngine.getLogger(MemberMapInvalidationMetaDataFetcher.class);
    InvalidationMetaDataFetcher invalidationMetaDataFetcher = new MemberMapInvalidationMetaDataFetcher(clusterService, operationService, metadataFetcherLogger);
    ILogger repairingTaskLogger = nodeEngine.getLogger(RepairingTask.class);
    UUID localUuid = nodeEngine.getLocalMember().getUuid();
    return new RepairingTask(properties, invalidationMetaDataFetcher, executionService.getGlobalTaskScheduler(), serializationService, partitionService, localUuid, repairingTaskLogger);
}
Also used : HazelcastProperties(com.hazelcast.spi.properties.HazelcastProperties) ClusterService(com.hazelcast.internal.cluster.ClusterService) RepairingTask(com.hazelcast.internal.nearcache.impl.invalidation.RepairingTask) ILogger(com.hazelcast.logging.ILogger) OperationService(com.hazelcast.spi.impl.operationservice.OperationService) ExecutionService(com.hazelcast.spi.impl.executionservice.ExecutionService) MemberMapInvalidationMetaDataFetcher(com.hazelcast.map.impl.nearcache.invalidation.MemberMapInvalidationMetaDataFetcher) UUID(java.util.UUID) MemberMapInvalidationMetaDataFetcher(com.hazelcast.map.impl.nearcache.invalidation.MemberMapInvalidationMetaDataFetcher) InvalidationMetaDataFetcher(com.hazelcast.internal.nearcache.impl.invalidation.InvalidationMetaDataFetcher)

Example 69 with OperationService

use of com.hazelcast.spi.impl.operationservice.OperationService in project hazelcast by hazelcast.

the class ClearOperation method replicateClearOperation.

private void replicateClearOperation(long version) {
    OperationService operationService = getNodeEngine().getOperationService();
    Collection<Address> members = getMemberAddresses();
    for (Address address : members) {
        Operation op = new ClearOperation(mapName, false, version).setPartitionId(getPartitionId()).setValidateTarget(false);
        operationService.createInvocationBuilder(getServiceName(), op, address).setTryCount(INVOCATION_TRY_COUNT).invoke();
    }
}
Also used : Address(com.hazelcast.cluster.Address) OperationService(com.hazelcast.spi.impl.operationservice.OperationService) MutatingOperation(com.hazelcast.spi.impl.operationservice.MutatingOperation) Operation(com.hazelcast.spi.impl.operationservice.Operation)

Example 70 with OperationService

use of com.hazelcast.spi.impl.operationservice.OperationService in project hazelcast by hazelcast.

the class ReplicatedMapProxy method createPutAllOperationFuture.

private Future createPutAllOperationFuture(String name, MapEntries entrySet, int partitionId) {
    OperationService operationService = nodeEngine.getOperationService();
    Operation op = new PutAllOperation(name, entrySet);
    return operationService.invokeOnPartition(SERVICE_NAME, op, partitionId);
}
Also used : PutAllOperation(com.hazelcast.replicatedmap.impl.operation.PutAllOperation) OperationService(com.hazelcast.spi.impl.operationservice.OperationService) PutAllOperation(com.hazelcast.replicatedmap.impl.operation.PutAllOperation) RequestMapDataOperation(com.hazelcast.replicatedmap.impl.operation.RequestMapDataOperation) Operation(com.hazelcast.spi.impl.operationservice.Operation) RemoveOperation(com.hazelcast.replicatedmap.impl.operation.RemoveOperation) PutOperation(com.hazelcast.replicatedmap.impl.operation.PutOperation)

Aggregations

OperationService (com.hazelcast.spi.impl.operationservice.OperationService)140 Operation (com.hazelcast.spi.impl.operationservice.Operation)55 Test (org.junit.Test)54 HazelcastInstance (com.hazelcast.core.HazelcastInstance)46 QuickTest (com.hazelcast.test.annotation.QuickTest)41 Accessors.getOperationService (com.hazelcast.test.Accessors.getOperationService)40 ParallelJVMTest (com.hazelcast.test.annotation.ParallelJVMTest)40 Address (com.hazelcast.cluster.Address)31 NodeEngine (com.hazelcast.spi.impl.NodeEngine)31 InternalCompletableFuture (com.hazelcast.spi.impl.InternalCompletableFuture)24 Future (java.util.concurrent.Future)24 TestHazelcastInstanceFactory (com.hazelcast.test.TestHazelcastInstanceFactory)23 Config (com.hazelcast.config.Config)22 Member (com.hazelcast.cluster.Member)21 Data (com.hazelcast.internal.serialization.Data)12 SlowTest (com.hazelcast.test.annotation.SlowTest)12 ClusterService (com.hazelcast.internal.cluster.ClusterService)9 ILogger (com.hazelcast.logging.ILogger)7 ArrayList (java.util.ArrayList)7 IPartitionService (com.hazelcast.internal.partition.IPartitionService)6