Search in sources :

Example 81 with Address

use of com.hazelcast.cluster.Address in project hazelcast by hazelcast.

the class MapProxySupport method putAllInternal.

/**
 * This method will group all entries per partition and send one operation
 * per member. If there are e.g. five keys for a single member, even if
 * they are from different partitions, there will only be a single remote
 * invocation instead of five.
 * <p>
 * There is also an optional support for batching to send smaller packages.
 * Takes care about {@code null} checks for keys and values.
 *
 * @param future iff not-null, execute asynchronously by completing this future.
 *               Batching is not supported in async mode
 */
@SuppressWarnings({ "checkstyle:MethodLength", "checkstyle:CyclomaticComplexity", "checkstyle:NPathComplexity" })
protected void putAllInternal(Map<? extends K, ? extends V> map, @Nullable InternalCompletableFuture<Void> future, boolean triggerMapLoader) {
    try {
        int mapSize = map.size();
        if (mapSize == 0) {
            if (future != null) {
                future.complete(null);
            }
            return;
        }
        boolean useBatching = future == null && isPutAllUseBatching(mapSize);
        int partitionCount = partitionService.getPartitionCount();
        int initialSize = getPutAllInitialSize(useBatching, mapSize, partitionCount);
        Map<Address, List<Integer>> memberPartitionsMap = partitionService.getMemberPartitionsMap();
        // init counters for batching
        MutableLong[] counterPerMember = null;
        Address[] addresses = null;
        if (useBatching) {
            counterPerMember = new MutableLong[partitionCount];
            addresses = new Address[partitionCount];
            for (Entry<Address, List<Integer>> addressListEntry : memberPartitionsMap.entrySet()) {
                MutableLong counter = new MutableLong();
                Address address = addressListEntry.getKey();
                for (int partitionId : addressListEntry.getValue()) {
                    counterPerMember[partitionId] = counter;
                    addresses[partitionId] = address;
                }
            }
        }
        // fill entriesPerPartition
        MapEntries[] entriesPerPartition = new MapEntries[partitionCount];
        for (Entry entry : map.entrySet()) {
            checkNotNull(entry.getKey(), NULL_KEY_IS_NOT_ALLOWED);
            checkNotNull(entry.getValue(), NULL_VALUE_IS_NOT_ALLOWED);
            Data keyData = toDataWithStrategy(entry.getKey());
            int partitionId = partitionService.getPartitionId(keyData);
            MapEntries entries = entriesPerPartition[partitionId];
            if (entries == null) {
                entries = new MapEntries(initialSize);
                entriesPerPartition[partitionId] = entries;
            }
            entries.add(keyData, toData(entry.getValue()));
            if (useBatching) {
                long currentSize = ++counterPerMember[partitionId].value;
                if (currentSize % putAllBatchSize == 0) {
                    List<Integer> partitions = memberPartitionsMap.get(addresses[partitionId]);
                    invokePutAllOperation(addresses[partitionId], partitions, entriesPerPartition, triggerMapLoader).get();
                }
            }
        }
        // invoke operations for entriesPerPartition
        AtomicInteger counter = new AtomicInteger(memberPartitionsMap.size());
        InternalCompletableFuture<Void> resultFuture = future != null ? future : new InternalCompletableFuture<>();
        BiConsumer<Void, Throwable> callback = (response, t) -> {
            if (t != null) {
                resultFuture.completeExceptionally(t);
            }
            if (counter.decrementAndGet() == 0) {
                try {
                    // don't ignore errors here, see https://github.com/hazelcast/hazelcast-jet/issues/3046
                    finalizePutAll(map);
                } catch (Throwable e) {
                    resultFuture.completeExceptionally(e);
                    return;
                }
                if (!resultFuture.isDone()) {
                    resultFuture.complete(null);
                }
            }
        };
        for (Entry<Address, List<Integer>> entry : memberPartitionsMap.entrySet()) {
            invokePutAllOperation(entry.getKey(), entry.getValue(), entriesPerPartition, triggerMapLoader).whenCompleteAsync(callback);
        }
        // if executing in sync mode, block for the responses
        if (future == null) {
            resultFuture.get();
        }
    } catch (Throwable e) {
        throw rethrow(e);
    }
}
Also used : MutableLong(com.hazelcast.internal.util.MutableLong) Arrays(java.util.Arrays) PartitionPredicate(com.hazelcast.query.PartitionPredicate) ExceptionUtil.rethrow(com.hazelcast.internal.util.ExceptionUtil.rethrow) AbstractDistributedObject(com.hazelcast.spi.impl.AbstractDistributedObject) Collections.singletonList(java.util.Collections.singletonList) MapConfig(com.hazelcast.config.MapConfig) Future(java.util.concurrent.Future) MapEntries(com.hazelcast.map.impl.MapEntries) TruePredicate(com.hazelcast.query.impl.predicates.TruePredicate) SerializationService(com.hazelcast.internal.serialization.SerializationService) PartitionContainer(com.hazelcast.map.impl.PartitionContainer) Map(java.util.Map) LockSupportServiceImpl(com.hazelcast.internal.locksupport.LockSupportServiceImpl) PartitioningStrategy(com.hazelcast.partition.PartitioningStrategy) IPartitionService(com.hazelcast.internal.partition.IPartitionService) ExceptionUtil(com.hazelcast.internal.util.ExceptionUtil) Set(java.util.Set) EntryView(com.hazelcast.core.EntryView) Result(com.hazelcast.map.impl.query.Result) QueryCacheContext(com.hazelcast.map.impl.querycache.QueryCacheContext) Predicates.alwaysFalse(com.hazelcast.query.Predicates.alwaysFalse) AddIndexOperation(com.hazelcast.map.impl.operation.AddIndexOperation) Target(com.hazelcast.map.impl.query.Target) IterableUtil.nullToEmpty(com.hazelcast.internal.util.IterableUtil.nullToEmpty) IPartition(com.hazelcast.internal.partition.IPartition) EventListener(java.util.EventListener) AwaitMapFlushOperation(com.hazelcast.map.impl.operation.AwaitMapFlushOperation) MapOperationProvider(com.hazelcast.map.impl.operation.MapOperationProvider) MapStoreConfig(com.hazelcast.config.MapStoreConfig) LockProxySupport(com.hazelcast.internal.locksupport.LockProxySupport) IterationType(com.hazelcast.internal.util.IterationType) PartitionIdSet(com.hazelcast.internal.util.collection.PartitionIdSet) QueryEngine(com.hazelcast.map.impl.query.QueryEngine) HazelcastInstanceAware(com.hazelcast.core.HazelcastInstanceAware) Query(com.hazelcast.map.impl.query.Query) EntryEventFilter(com.hazelcast.map.impl.EntryEventFilter) Math.log10(java.lang.Math.log10) InMemoryFormat(com.hazelcast.config.InMemoryFormat) Supplier(java.util.function.Supplier) CLEAR_ALL(com.hazelcast.core.EntryEventType.CLEAR_ALL) RemoveInterceptorOperationSupplier(com.hazelcast.map.impl.operation.RemoveInterceptorOperationSupplier) ArrayList(java.util.ArrayList) QueryEventFilter(com.hazelcast.map.impl.query.QueryEventFilter) EntryListenerConfig(com.hazelcast.config.EntryListenerConfig) BiConsumer(java.util.function.BiConsumer) BinaryOperationFactory(com.hazelcast.spi.impl.operationservice.BinaryOperationFactory) Nullable(javax.annotation.Nullable) LocalMapStats(com.hazelcast.map.LocalMapStats) InvocationUtil.invokeOnStableClusterSerial(com.hazelcast.internal.util.InvocationUtil.invokeOnStableClusterSerial) ThreadUtil.getThreadId(com.hazelcast.internal.util.ThreadUtil.getThreadId) InternalCompletableFuture.newCompletedFuture(com.hazelcast.spi.impl.InternalCompletableFuture.newCompletedFuture) IsPartitionLoadedOperationFactory(com.hazelcast.map.impl.operation.IsPartitionLoadedOperationFactory) ClassLoaderUtil(com.hazelcast.internal.nio.ClassLoaderUtil) TargetMode(com.hazelcast.map.impl.query.Target.TargetMode) QueryCacheEndToEndProvider(com.hazelcast.map.impl.querycache.subscriber.QueryCacheEndToEndProvider) CollectionUtil.asIntegerList(com.hazelcast.internal.util.CollectionUtil.asIntegerList) EventFilter(com.hazelcast.spi.impl.eventservice.EventFilter) Preconditions.checkNotNull(com.hazelcast.internal.util.Preconditions.checkNotNull) Target.createPartitionTarget(com.hazelcast.map.impl.query.Target.createPartitionTarget) LocalMapStatsImpl(com.hazelcast.internal.monitor.impl.LocalMapStatsImpl) MapEventPublisher(com.hazelcast.map.impl.event.MapEventPublisher) MapPartitionLostListenerConfig(com.hazelcast.config.MapPartitionLostListenerConfig) EntryProcessor(com.hazelcast.map.EntryProcessor) ReadOnly(com.hazelcast.core.ReadOnly) AddInterceptorOperationSupplier(com.hazelcast.map.impl.operation.AddInterceptorOperationSupplier) OperationFactory(com.hazelcast.spi.impl.operationservice.OperationFactory) OperationService(com.hazelcast.spi.impl.operationservice.OperationService) Address(com.hazelcast.cluster.Address) InvocationFuture(com.hazelcast.spi.impl.operationservice.impl.InvocationFuture) InternalCompletableFuture(com.hazelcast.spi.impl.InternalCompletableFuture) IsEmptyOperationFactory(com.hazelcast.map.impl.operation.IsEmptyOperationFactory) MapListener(com.hazelcast.map.listener.MapListener) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) InitializingObject(com.hazelcast.spi.impl.InitializingObject) IndexUtils(com.hazelcast.query.impl.IndexUtils) Predicate(com.hazelcast.query.Predicate) CALLER_RUNS(com.hazelcast.internal.util.ConcurrencyUtil.CALLER_RUNS) Collection(java.util.Collection) IsKeyLoadFinishedOperation(com.hazelcast.map.impl.operation.IsKeyLoadFinishedOperation) UUID(java.util.UUID) Math.ceil(java.lang.Math.ceil) Math.min(java.lang.Math.min) SubscriberContext(com.hazelcast.map.impl.querycache.subscriber.SubscriberContext) IndexConfig(com.hazelcast.config.IndexConfig) List(java.util.List) Preconditions.checkFalse(com.hazelcast.internal.util.Preconditions.checkFalse) SetUtil.createHashSet(com.hazelcast.internal.util.SetUtil.createHashSet) TimeUtil.timeInMsOrOneIfResultIsZero(com.hazelcast.internal.util.TimeUtil.timeInMsOrOneIfResultIsZero) Projection(com.hazelcast.projection.Projection) IterableUtil(com.hazelcast.internal.util.IterableUtil) HashMap(java.util.HashMap) CompletableFuture(java.util.concurrent.CompletableFuture) Function(java.util.function.Function) MapUtil.createHashMap(com.hazelcast.internal.util.MapUtil.createHashMap) Aggregator(com.hazelcast.aggregation.Aggregator) ListenerConfig(com.hazelcast.config.ListenerConfig) IndexType(com.hazelcast.config.IndexType) Operation(com.hazelcast.spi.impl.operationservice.Operation) HazelcastProperty(com.hazelcast.spi.properties.HazelcastProperty) Collections.singletonMap(java.util.Collections.singletonMap) MapUtil.toIntSize(com.hazelcast.internal.util.MapUtil.toIntSize) Nonnull(javax.annotation.Nonnull) Timer(com.hazelcast.internal.util.Timer) NodeEngine(com.hazelcast.spi.impl.NodeEngine) Iterator(java.util.Iterator) EntryEventType(com.hazelcast.core.EntryEventType) MapOperation(com.hazelcast.map.impl.operation.MapOperation) MapInterceptor(com.hazelcast.map.MapInterceptor) HazelcastProperties(com.hazelcast.spi.properties.HazelcastProperties) Data(com.hazelcast.internal.serialization.Data) MapService(com.hazelcast.map.impl.MapService) MapServiceContext(com.hazelcast.map.impl.MapServiceContext) RecordStore(com.hazelcast.map.impl.recordstore.RecordStore) TimeUnit(java.util.concurrent.TimeUnit) SERVICE_NAME(com.hazelcast.map.impl.MapService.SERVICE_NAME) MapPartitionLostListener(com.hazelcast.map.listener.MapPartitionLostListener) ENTRY_REMOVING_PROCESSOR(com.hazelcast.map.impl.EntryRemovingProcessor.ENTRY_REMOVING_PROCESSOR) Collections(java.util.Collections) IMap(com.hazelcast.map.IMap) Address(com.hazelcast.cluster.Address) Data(com.hazelcast.internal.serialization.Data) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) MutableLong(com.hazelcast.internal.util.MutableLong) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) MapEntries(com.hazelcast.map.impl.MapEntries) Collections.singletonList(java.util.Collections.singletonList) ArrayList(java.util.ArrayList) CollectionUtil.asIntegerList(com.hazelcast.internal.util.CollectionUtil.asIntegerList) List(java.util.List)

Example 82 with Address

use of com.hazelcast.cluster.Address in project hazelcast by hazelcast.

the class QueryEngineImpl method dispatchFullQueryOnAllMembersOnQueryThread.

private List<Future<Result>> dispatchFullQueryOnAllMembersOnQueryThread(Query query) {
    Collection<Address> members;
    if (query.getPartitionIdSet().size() == partitionService.getPartitionCount()) {
        members = clusterService.getMembers(DATA_MEMBER_SELECTOR).stream().map(m -> m.getAddress()).collect(Collectors.toList());
    } else {
        members = new HashSet<>();
        for (PrimitiveIterator.OfInt iterator = query.getPartitionIdSet().intIterator(); iterator.hasNext(); ) {
            members.add(partitionService.getPartitionOwnerOrWait(iterator.next()));
        }
    }
    List<Future<Result>> futures = new ArrayList<>(members.size());
    for (Address address : members) {
        Operation operation = createQueryOperation(query);
        Future<Result> future = operationService.invokeOnTarget(MapService.SERVICE_NAME, operation, address);
        futures.add(future);
    }
    return futures;
}
Also used : Address(com.hazelcast.cluster.Address) PrimitiveIterator(java.util.PrimitiveIterator) ArrayList(java.util.ArrayList) Future(java.util.concurrent.Future) Operation(com.hazelcast.spi.impl.operationservice.Operation)

Example 83 with Address

use of com.hazelcast.cluster.Address in project hazelcast by hazelcast.

the class MultiMapProxySupport method putAllInternal.

// NB: this method is generally copied from MapProxySupport#putAllInternal
@SuppressWarnings({ "checkstyle:npathcomplexity", "checkstyle:methodlength" })
protected void putAllInternal(Map<Data, Data> map, @Nullable InternalCompletableFuture<Void> future) {
    // get partition to entries mapping
    try {
        int mapSize = map.size();
        if (mapSize == 0) {
            if (future != null) {
                future.complete(null);
            }
            return;
        }
        int partitionCount = partitionService.getPartitionCount();
        int initialSize = getPutAllInitialSize(mapSize, partitionCount);
        // get node to partition mapping
        Map<Address, List<Integer>> memberPartitionsMap = partitionService.getMemberPartitionsMap();
        // fill entriesPerPartition
        MapEntries[] entriesPerPartition = new MapEntries[partitionCount];
        for (Map.Entry<Data, Data> entry : map.entrySet()) {
            checkNotNull(entry.getKey(), NULL_KEY_IS_NOT_ALLOWED);
            checkNotNull(entry.getValue(), NULL_VALUE_IS_NOT_ALLOWED);
            Data keyData = entry.getKey();
            int partitionId = partitionService.getPartitionId(keyData);
            MapEntries entries = entriesPerPartition[partitionId];
            if (entries == null) {
                entries = new MapEntries(initialSize);
                entriesPerPartition[partitionId] = entries;
            }
            entries.add(keyData, entry.getValue());
        }
        // invoke operations for entriesPerPartition
        AtomicInteger counter = new AtomicInteger(memberPartitionsMap.size());
        InternalCompletableFuture<Void> resultFuture = future != null ? future : new InternalCompletableFuture<>();
        BiConsumer<Void, Throwable> callback = (response, t) -> {
            if (t != null) {
                resultFuture.completeExceptionally(t);
            }
            if (counter.decrementAndGet() == 0) {
                if (!resultFuture.isDone()) {
                    resultFuture.complete(null);
                }
            }
        };
        for (Map.Entry<Address, List<Integer>> entry : memberPartitionsMap.entrySet()) {
            invokePutAllOperation(entry.getKey(), entry.getValue(), entriesPerPartition).whenCompleteAsync(callback);
        }
        // if executing in sync mode, block for the responses
        if (future == null) {
            resultFuture.get();
        }
    } catch (Throwable e) {
        throw rethrow(e);
    }
}
Also used : Address(com.hazelcast.cluster.Address) Arrays(java.util.Arrays) CompletableFuture(java.util.concurrent.CompletableFuture) ExceptionUtil.rethrow(com.hazelcast.internal.util.ExceptionUtil.rethrow) AbstractDistributedObject(com.hazelcast.spi.impl.AbstractDistributedObject) InternalCompletableFuture(com.hazelcast.spi.impl.InternalCompletableFuture) HashSet(java.util.HashSet) Future(java.util.concurrent.Future) MultiMapConfig(com.hazelcast.config.MultiMapConfig) NULL_VALUE_IS_NOT_ALLOWED(com.hazelcast.multimap.impl.MultiMapProxyImpl.NULL_VALUE_IS_NOT_ALLOWED) MapEntries(com.hazelcast.map.impl.MapEntries) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) PutOperation(com.hazelcast.multimap.impl.operations.PutOperation) Operation(com.hazelcast.spi.impl.operationservice.Operation) Map(java.util.Map) BiConsumer(java.util.function.BiConsumer) GetAllOperation(com.hazelcast.multimap.impl.operations.GetAllOperation) MultiMapOperationFactory(com.hazelcast.multimap.impl.operations.MultiMapOperationFactory) Collections.singletonMap(java.util.Collections.singletonMap) MapUtil.toIntSize(com.hazelcast.internal.util.MapUtil.toIntSize) MultiMapResponse(com.hazelcast.multimap.impl.operations.MultiMapResponse) OperationFactoryType(com.hazelcast.multimap.impl.operations.MultiMapOperationFactory.OperationFactoryType) LockSupportServiceImpl(com.hazelcast.internal.locksupport.LockSupportServiceImpl) Nullable(javax.annotation.Nullable) Timer(com.hazelcast.internal.util.Timer) CALLER_RUNS(com.hazelcast.internal.util.ConcurrencyUtil.CALLER_RUNS) RemoveOperation(com.hazelcast.multimap.impl.operations.RemoveOperation) InternalCompletableFuture.newCompletedFuture(com.hazelcast.spi.impl.InternalCompletableFuture.newCompletedFuture) NodeEngine(com.hazelcast.spi.impl.NodeEngine) EntryEventType(com.hazelcast.core.EntryEventType) IPartitionService(com.hazelcast.internal.partition.IPartitionService) DistributedObjectNamespace(com.hazelcast.internal.services.DistributedObjectNamespace) CollectionUtil.asIntegerList(com.hazelcast.internal.util.CollectionUtil.asIntegerList) Data(com.hazelcast.internal.serialization.Data) ExceptionUtil(com.hazelcast.internal.util.ExceptionUtil) Set(java.util.Set) LocalMultiMapStatsImpl(com.hazelcast.internal.monitor.impl.LocalMultiMapStatsImpl) Preconditions.checkNotNull(com.hazelcast.internal.util.Preconditions.checkNotNull) DeleteOperation(com.hazelcast.multimap.impl.operations.DeleteOperation) MultiMapPutAllOperationFactory(com.hazelcast.multimap.impl.operations.MultiMapPutAllOperationFactory) RemoveAllOperation(com.hazelcast.multimap.impl.operations.RemoveAllOperation) List(java.util.List) LockProxySupport(com.hazelcast.internal.locksupport.LockProxySupport) OperationFactory(com.hazelcast.spi.impl.operationservice.OperationFactory) OperationService(com.hazelcast.spi.impl.operationservice.OperationService) NULL_KEY_IS_NOT_ALLOWED(com.hazelcast.multimap.impl.MultiMapProxyImpl.NULL_KEY_IS_NOT_ALLOWED) CountOperation(com.hazelcast.multimap.impl.operations.CountOperation) ThreadUtil(com.hazelcast.internal.util.ThreadUtil) Address(com.hazelcast.cluster.Address) Data(com.hazelcast.internal.serialization.Data) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) MapEntries(com.hazelcast.map.impl.MapEntries) CollectionUtil.asIntegerList(com.hazelcast.internal.util.CollectionUtil.asIntegerList) List(java.util.List) Map(java.util.Map) Collections.singletonMap(java.util.Collections.singletonMap)

Example 84 with Address

use of com.hazelcast.cluster.Address in project hazelcast by hazelcast.

the class MultiMapService method createStats.

LocalMultiMapStats createStats(String name) {
    LocalMultiMapStatsImpl stats = getLocalMultiMapStatsImpl(name);
    long ownedEntryCount = 0;
    long backupEntryCount = 0;
    long hits = 0;
    long lockedEntryCount = 0;
    long lastAccessTime = 0;
    long lastUpdateTime = 0;
    ClusterService clusterService = nodeEngine.getClusterService();
    MultiMapConfig config = nodeEngine.getConfig().findMultiMapConfig(name);
    int backupCount = config.getTotalBackupCount();
    Address thisAddress = clusterService.getThisAddress();
    for (int partitionId = 0; partitionId < nodeEngine.getPartitionService().getPartitionCount(); partitionId++) {
        IPartition partition = nodeEngine.getPartitionService().getPartition(partitionId, false);
        MultiMapPartitionContainer partitionContainer = getPartitionContainer(partitionId);
        MultiMapContainer multiMapContainer = partitionContainer.getMultiMapContainer(name, false);
        if (multiMapContainer == null) {
            continue;
        }
        Address owner = partition.getOwnerOrNull();
        if (owner != null) {
            if (owner.equals(thisAddress)) {
                lockedEntryCount += multiMapContainer.getLockedCount();
                lastAccessTime = max(lastAccessTime, multiMapContainer.getLastAccessTime());
                lastUpdateTime = max(lastUpdateTime, multiMapContainer.getLastUpdateTime());
                for (MultiMapValue multiMapValue : multiMapContainer.getMultiMapValues().values()) {
                    hits += multiMapValue.getHits();
                    ownedEntryCount += multiMapValue.getCollection(false).size();
                }
            } else {
                for (int j = 1; j <= backupCount; j++) {
                    // wait if the partition table is not updated yet
                    Address replicaAddress = getReplicaAddress(partition, backupCount, j);
                    if (replicaAddress != null && replicaAddress.equals(thisAddress)) {
                        for (MultiMapValue multiMapValue : multiMapContainer.getMultiMapValues().values()) {
                            backupEntryCount += multiMapValue.getCollection(false).size();
                        }
                    }
                }
            }
        }
    }
    stats.setOwnedEntryCount(ownedEntryCount);
    stats.setBackupEntryCount(backupEntryCount);
    stats.setHits(hits);
    stats.setLockedEntryCount(lockedEntryCount);
    stats.setBackupCount(backupCount);
    stats.setLastAccessTime(lastAccessTime);
    stats.setLastUpdateTime(lastUpdateTime);
    return stats;
}
Also used : ClusterService(com.hazelcast.internal.cluster.ClusterService) Address(com.hazelcast.cluster.Address) MultiMapConfig(com.hazelcast.config.MultiMapConfig) ConfigValidator.checkMultiMapConfig(com.hazelcast.internal.config.ConfigValidator.checkMultiMapConfig) LocalMultiMapStatsImpl(com.hazelcast.internal.monitor.impl.LocalMultiMapStatsImpl) IPartition(com.hazelcast.internal.partition.IPartition) MigrationEndpoint(com.hazelcast.internal.partition.MigrationEndpoint)

Example 85 with Address

use of com.hazelcast.cluster.Address in project hazelcast by hazelcast.

the class PutOperation method run.

@Override
public void run() throws Exception {
    service = getService();
    ReplicatedRecordStore store = service.getReplicatedRecordStore(name, true, getPartitionId());
    Address thisAddress = getNodeEngine().getThisAddress();
    boolean isLocal = getCallerAddress().equals(thisAddress);
    Object putResult = store.put(key, value, ttl, TimeUnit.MILLISECONDS, isLocal);
    oldValue = getNodeEngine().toData(putResult);
    response = new VersionResponsePair(putResult, store.getVersion());
    if (!isLocal) {
        sendUpdateCallerOperation(false);
    }
}
Also used : Address(com.hazelcast.cluster.Address) ReplicatedRecordStore(com.hazelcast.replicatedmap.impl.record.ReplicatedRecordStore)

Aggregations

Address (com.hazelcast.cluster.Address)540 Test (org.junit.Test)211 QuickTest (com.hazelcast.test.annotation.QuickTest)191 ParallelJVMTest (com.hazelcast.test.annotation.ParallelJVMTest)178 HazelcastInstance (com.hazelcast.core.HazelcastInstance)92 InetAddress (java.net.InetAddress)75 ArrayList (java.util.ArrayList)66 Member (com.hazelcast.cluster.Member)63 Accessors.getAddress (com.hazelcast.test.Accessors.getAddress)54 MemberImpl (com.hazelcast.cluster.impl.MemberImpl)48 Config (com.hazelcast.config.Config)43 PartitionReplica (com.hazelcast.internal.partition.PartitionReplica)43 UUID (java.util.UUID)43 ILogger (com.hazelcast.logging.ILogger)37 HashMap (java.util.HashMap)36 Operation (com.hazelcast.spi.impl.operationservice.Operation)35 List (java.util.List)35 OperationService (com.hazelcast.spi.impl.operationservice.OperationService)34 Map (java.util.Map)33 InetSocketAddress (java.net.InetSocketAddress)32