Search in sources :

Example 1 with SingletonMapResponseCollector

use of org.infinispan.remoting.transport.impl.SingletonMapResponseCollector in project infinispan by infinispan.

the class ScatteredDistributionInterceptor method visitGetAllCommand.

@Override
public Object visitGetAllCommand(InvocationContext ctx, GetAllCommand command) throws Throwable {
    LocalizedCacheTopology cacheTopology = checkTopology(command);
    if (command.hasAnyFlag(FlagBitSets.CACHE_MODE_LOCAL | FlagBitSets.SKIP_REMOTE_LOOKUP | FlagBitSets.SKIP_OWNERSHIP_CHECK)) {
        return invokeNext(ctx, command);
    }
    if (ctx.isOriginLocal()) {
        Map<Address, List<Object>> remoteKeys = new HashMap<>();
        for (Object key : command.getKeys()) {
            if (ctx.lookupEntry(key) != null) {
                continue;
            }
            DistributionInfo info = cacheTopology.getDistribution(key);
            if (info.primary() == null) {
                throw OutdatedTopologyException.RETRY_NEXT_TOPOLOGY;
            } else if (!info.isPrimary()) {
                remoteKeys.computeIfAbsent(info.primary(), k -> new ArrayList<>()).add(key);
            }
        }
        if (remoteKeys.isEmpty()) {
            return invokeNext(ctx, command);
        }
        ClusteredGetAllFuture sync = new ClusteredGetAllFuture(remoteKeys.size());
        for (Map.Entry<Address, List<Object>> remote : remoteKeys.entrySet()) {
            List<Object> keys = remote.getValue();
            ClusteredGetAllCommand clusteredGetAllCommand = cf.buildClusteredGetAllCommand(keys, command.getFlagsBitSet(), null);
            clusteredGetAllCommand.setTopologyId(command.getTopologyId());
            SingletonMapResponseCollector collector = SingletonMapResponseCollector.ignoreLeavers();
            CompletionStage<Map<Address, Response>> rpcFuture = rpcManager.invokeCommand(remote.getKey(), clusteredGetAllCommand, collector, rpcManager.getSyncRpcOptions());
            rpcFuture.whenComplete(((responseMap, throwable) -> handleGetAllResponse(responseMap, throwable, ctx, keys, sync)));
        }
        return asyncInvokeNext(ctx, command, sync);
    } else {
        // remote
        for (Object key : command.getKeys()) {
            if (ctx.lookupEntry(key) == null) {
                return UnsureResponse.INSTANCE;
            }
        }
        return invokeNext(ctx, command);
    }
}
Also used : WriteCommand(org.infinispan.commands.write.WriteCommand) Arrays(java.util.Arrays) GetCacheEntryCommand(org.infinispan.commands.read.GetCacheEntryCommand) CacheNotFoundResponse(org.infinispan.remoting.responses.CacheNotFoundResponse) LogFactory(org.infinispan.util.logging.LogFactory) RemoteMetadata(org.infinispan.container.entries.RemoteMetadata) ClusteredGetAllCommand(org.infinispan.commands.remote.ClusteredGetAllCommand) Map(java.util.Map) RemoveCommand(org.infinispan.commands.write.RemoveCommand) ConsistentHash(org.infinispan.distribution.ch.ConsistentHash) EmbeddedMetadata(org.infinispan.metadata.EmbeddedMetadata) ReadWriteManyEntriesCommand(org.infinispan.commands.functional.ReadWriteManyEntriesCommand) UnsuccessfulResponse(org.infinispan.remoting.responses.UnsuccessfulResponse) Set(java.util.Set) GroupManager(org.infinispan.distribution.group.impl.GroupManager) CacheTopology(org.infinispan.topology.CacheTopology) ResponseCollector(org.infinispan.remoting.transport.ResponseCollector) DONT_LOAD(org.infinispan.commands.VisitableCommand.LoadType.DONT_LOAD) CompletionStage(java.util.concurrent.CompletionStage) Stream(java.util.stream.Stream) SuccessfulResponse(org.infinispan.remoting.responses.SuccessfulResponse) InternalCacheValue(org.infinispan.container.entries.InternalCacheValue) AbstractVisitor(org.infinispan.commands.AbstractVisitor) ArrayCollector(org.infinispan.commons.util.ArrayCollector) InternalCacheEntry(org.infinispan.container.entries.InternalCacheEntry) CacheEntryRemoved(org.infinispan.notifications.cachelistener.annotation.CacheEntryRemoved) PersistenceManager(org.infinispan.persistence.manager.PersistenceManager) ComputeCommand(org.infinispan.commands.write.ComputeCommand) MetadataAwareCommand(org.infinispan.commands.MetadataAwareCommand) EvictionManager(org.infinispan.eviction.EvictionManager) ReadOnlyKeyCommand(org.infinispan.commands.functional.ReadOnlyKeyCommand) ArrayList(java.util.ArrayList) WriteOnlyManyEntriesCommand(org.infinispan.commands.functional.WriteOnlyManyEntriesCommand) Start(org.infinispan.factories.annotations.Start) MapResponseCollector(org.infinispan.remoting.transport.impl.MapResponseCollector) PassthroughSingleResponseCollector(org.infinispan.remoting.transport.impl.PassthroughSingleResponseCollector) SingleResponseCollector(org.infinispan.remoting.transport.impl.SingleResponseCollector) DataWriteCommand(org.infinispan.commands.write.DataWriteCommand) FunctionalNotifier(org.infinispan.functional.impl.FunctionalNotifier) ValueMatcher(org.infinispan.commands.write.ValueMatcher) ClearCommand(org.infinispan.commands.write.ClearCommand) Address(org.infinispan.remoting.transport.Address) ExceptionResponse(org.infinispan.remoting.responses.ExceptionResponse) CacheEntry(org.infinispan.container.entries.CacheEntry) NotifyHelper(org.infinispan.notifications.cachelistener.NotifyHelper) WriteOnlyKeyValueCommand(org.infinispan.commands.functional.WriteOnlyKeyValueCommand) ValidResponse(org.infinispan.remoting.responses.ValidResponse) CacheNotifier(org.infinispan.notifications.cachelistener.CacheNotifier) Inject(org.infinispan.factories.annotations.Inject) ReadWriteKeyCommand(org.infinispan.commands.functional.ReadWriteKeyCommand) ReadWriteManyCommand(org.infinispan.commands.functional.ReadWriteManyCommand) NullCacheEntry(org.infinispan.container.entries.NullCacheEntry) AggregateCompletionStage(org.infinispan.util.concurrent.AggregateCompletionStage) ReplaceCommand(org.infinispan.commands.write.ReplaceCommand) EntryVersion(org.infinispan.container.versioning.EntryVersion) UnsureResponse(org.infinispan.remoting.responses.UnsureResponse) MultiTargetCollector(org.infinispan.util.concurrent.CommandAckCollector.MultiTargetCollector) GetKeysInGroupCommand(org.infinispan.commands.remote.GetKeysInGroupCommand) ActivationManager(org.infinispan.eviction.impl.ActivationManager) RepeatableReadEntry(org.infinispan.container.entries.RepeatableReadEntry) InvocationContext(org.infinispan.context.InvocationContext) CompletableFutures(org.infinispan.util.concurrent.CompletableFutures) OutdatedTopologyException(org.infinispan.statetransfer.OutdatedTopologyException) RpcOptions(org.infinispan.remoting.rpc.RpcOptions) Predicate(java.util.function.Predicate) Collection(java.util.Collection) ReadWriteKeyValueCommand(org.infinispan.commands.functional.ReadWriteKeyValueCommand) MetadataImmortalCacheEntry(org.infinispan.container.entries.metadata.MetadataImmortalCacheEntry) DataOperationOrderer(org.infinispan.util.concurrent.DataOperationOrderer) InequalVersionComparisonResult(org.infinispan.container.versioning.InequalVersionComparisonResult) InvocationSuccessFunction(org.infinispan.interceptors.InvocationSuccessFunction) List(java.util.List) SingletonMapResponseCollector(org.infinispan.remoting.transport.impl.SingletonMapResponseCollector) InvocationFinallyAction(org.infinispan.interceptors.InvocationFinallyAction) PutKeyValueCommand(org.infinispan.commands.write.PutKeyValueCommand) FlagAffectedCommand(org.infinispan.commands.FlagAffectedCommand) TopologyAffectedCommand(org.infinispan.commands.TopologyAffectedCommand) HashMap(java.util.HashMap) CompletableFuture(java.util.concurrent.CompletableFuture) Metadata(org.infinispan.metadata.Metadata) CompletionStages(org.infinispan.util.concurrent.CompletionStages) GetAllCommand(org.infinispan.commands.read.GetAllCommand) Function(java.util.function.Function) AllOwnersLostException(org.infinispan.statetransfer.AllOwnersLostException) FlagBitSets(org.infinispan.context.impl.FlagBitSets) KeyPartitioner(org.infinispan.distribution.ch.KeyPartitioner) ClusteredGetCommand(org.infinispan.commands.remote.ClusteredGetCommand) IracPutKeyValueCommand(org.infinispan.commands.write.IracPutKeyValueCommand) Log(org.infinispan.util.logging.Log) AbstractDataCommand(org.infinispan.commands.read.AbstractDataCommand) SegmentSpecificCommand(org.infinispan.commands.SegmentSpecificCommand) MetadataImmortalCacheValue(org.infinispan.container.entries.metadata.MetadataImmortalCacheValue) ResponseCollectors(org.infinispan.remoting.transport.ResponseCollectors) Response(org.infinispan.remoting.responses.Response) ClusteringInterceptor(org.infinispan.interceptors.impl.ClusteringInterceptor) GetKeyValueCommand(org.infinispan.commands.read.GetKeyValueCommand) CacheException(org.infinispan.commons.CacheException) Iterator(java.util.Iterator) EvictCommand(org.infinispan.commands.write.EvictCommand) WriteOnlyManyCommand(org.infinispan.commands.functional.WriteOnlyManyCommand) PutMapCommand(org.infinispan.commands.write.PutMapCommand) ReadOnlyManyCommand(org.infinispan.commands.functional.ReadOnlyManyCommand) ComputeIfAbsentCommand(org.infinispan.commands.write.ComputeIfAbsentCommand) LocalizedCacheTopology(org.infinispan.distribution.LocalizedCacheTopology) Configuration(org.infinispan.configuration.cache.Configuration) DistributionInfo(org.infinispan.distribution.DistributionInfo) Operation(org.infinispan.util.concurrent.DataOperationOrderer.Operation) WriteOnlyKeyCommand(org.infinispan.commands.functional.WriteOnlyKeyCommand) VisitableCommand(org.infinispan.commands.VisitableCommand) DeliverOrder(org.infinispan.remoting.inboundhandler.DeliverOrder) Collections(java.util.Collections) TimeService(org.infinispan.commons.time.TimeService) ScatteredVersionManager(org.infinispan.scattered.ScatteredVersionManager) Address(org.infinispan.remoting.transport.Address) HashMap(java.util.HashMap) LocalizedCacheTopology(org.infinispan.distribution.LocalizedCacheTopology) DistributionInfo(org.infinispan.distribution.DistributionInfo) ClusteredGetAllCommand(org.infinispan.commands.remote.ClusteredGetAllCommand) ArrayList(java.util.ArrayList) List(java.util.List) Map(java.util.Map) HashMap(java.util.HashMap) SingletonMapResponseCollector(org.infinispan.remoting.transport.impl.SingletonMapResponseCollector)

Example 2 with SingletonMapResponseCollector

use of org.infinispan.remoting.transport.impl.SingletonMapResponseCollector in project infinispan by infinispan.

the class NonTxDistributionInterceptor method handleRemoteSegmentsForReadWriteManyCommand.

private <C extends WriteCommand, Item> void handleRemoteSegmentsForReadWriteManyCommand(C command, WriteManyCommandHelper<C, ?, Item> helper, MergingCompletableFuture<Object> allFuture, MutableInt offset, Address member, IntSet segments, LocalizedCacheTopology topology) {
    final int myOffset = offset.value;
    // TODO: here we iterate through all entries - is the ReadOnlySegmentAwareMap really worth it?
    C copy = helper.copyForPrimary(command, topology, segments);
    copy.setTopologyId(command.getTopologyId());
    int size = helper.getItems(copy).size();
    offset.value += size;
    if (size <= 0) {
        allFuture.countDown();
        return;
    }
    // Send the command to primary owner
    SingletonMapResponseCollector collector = SingletonMapResponseCollector.validOnly();
    rpcManager.invokeCommand(member, copy, collector, rpcManager.getSyncRpcOptions()).whenComplete((responses, throwable) -> {
        if (throwable != null) {
            allFuture.completeExceptionally(throwable);
        } else {
            // FIXME Dan: The response cannot be a CacheNotFoundResponse at this point
            SuccessfulResponse response = getSuccessfulResponseOrFail(responses, allFuture, rsp -> allFuture.completeExceptionally(OutdatedTopologyException.RETRY_NEXT_TOPOLOGY));
            if (response == null) {
                return;
            }
            Object responseValue = response.getResponseValue();
            MergingCompletableFuture.moveListItemsToFuture(responseValue, allFuture, myOffset);
            allFuture.countDown();
        }
    });
}
Also used : SuccessfulResponse(org.infinispan.remoting.responses.SuccessfulResponse) SingletonMapResponseCollector(org.infinispan.remoting.transport.impl.SingletonMapResponseCollector)

Example 3 with SingletonMapResponseCollector

use of org.infinispan.remoting.transport.impl.SingletonMapResponseCollector in project infinispan by infinispan.

the class NonTxDistributionInterceptor method handleSegmentsForWriteOnlyManyCommand.

private <C extends WriteCommand, Container, Item> void handleSegmentsForWriteOnlyManyCommand(InvocationContext ctx, C command, WriteManyCommandHelper<C, Container, Item> helper, CountDownCompletableFuture allFuture, Address member, IntSet segments, LocalizedCacheTopology topology) {
    if (member.equals(rpcManager.getAddress())) {
        Container myItems = filterAndWrap(ctx, command, segments, helper);
        C localCommand = helper.copyForLocal(command, myItems);
        localCommand.setTopologyId(command.getTopologyId());
        // Local keys are backed up in the handler, and counters on allFuture are decremented when the backup
        // calls complete.
        invokeNextAndFinally(ctx, localCommand, createLocalInvocationHandler(allFuture, segments, helper, (f, rv) -> {
        }, topology));
        return;
    }
    C copy = helper.copyForPrimary(command, topology, segments);
    copy.setTopologyId(command.getTopologyId());
    int size = helper.getItems(copy).size();
    if (size <= 0) {
        allFuture.countDown();
        return;
    }
    SingletonMapResponseCollector collector = SingletonMapResponseCollector.validOnly();
    rpcManager.invokeCommand(member, copy, collector, rpcManager.getSyncRpcOptions()).whenComplete((responseMap, throwable) -> {
        if (throwable != null) {
            allFuture.completeExceptionally(throwable);
        } else {
            // FIXME Dan: The response cannot be a CacheNotFoundResponse at this point
            if (getSuccessfulResponseOrFail(responseMap, allFuture, rsp -> allFuture.completeExceptionally(OutdatedTopologyException.RETRY_NEXT_TOPOLOGY)) == null) {
                return;
            }
            allFuture.countDown();
        }
    });
}
Also used : WriteCommand(org.infinispan.commands.write.WriteCommand) IntSets(org.infinispan.commons.util.IntSets) ComputeCommand(org.infinispan.commands.write.ComputeCommand) LogFactory(org.infinispan.util.logging.LogFactory) ReplaceCommand(org.infinispan.commands.write.ReplaceCommand) HashMap(java.util.HashMap) CompletableFuture(java.util.concurrent.CompletableFuture) ArrayList(java.util.ArrayList) WriteOnlyManyEntriesCommand(org.infinispan.commands.functional.WriteOnlyManyEntriesCommand) FlagBitSets(org.infinispan.context.impl.FlagBitSets) InvocationContext(org.infinispan.context.InvocationContext) SingleResponseCollector(org.infinispan.remoting.transport.impl.SingleResponseCollector) OutdatedTopologyException(org.infinispan.statetransfer.OutdatedTopologyException) Map(java.util.Map) IracPutKeyValueCommand(org.infinispan.commands.write.IracPutKeyValueCommand) Log(org.infinispan.util.logging.Log) BiConsumer(java.util.function.BiConsumer) Address(org.infinispan.remoting.transport.Address) RemoveCommand(org.infinispan.commands.write.RemoveCommand) CacheEntry(org.infinispan.container.entries.CacheEntry) ConsistentHash(org.infinispan.distribution.ch.ConsistentHash) WriteOnlyKeyValueCommand(org.infinispan.commands.functional.WriteOnlyKeyValueCommand) Collection(java.util.Collection) ReadWriteManyEntriesCommand(org.infinispan.commands.functional.ReadWriteManyEntriesCommand) WriteOnlyManyCommand(org.infinispan.commands.functional.WriteOnlyManyCommand) ReadWriteKeyValueCommand(org.infinispan.commands.functional.ReadWriteKeyValueCommand) Set(java.util.Set) PutMapCommand(org.infinispan.commands.write.PutMapCommand) InvocationSuccessFunction(org.infinispan.interceptors.InvocationSuccessFunction) PrimitiveIterator(java.util.PrimitiveIterator) IntSet(org.infinispan.commons.util.IntSet) List(java.util.List) SingletonMapResponseCollector(org.infinispan.remoting.transport.impl.SingletonMapResponseCollector) CompletionStage(java.util.concurrent.CompletionStage) SuccessfulResponse(org.infinispan.remoting.responses.SuccessfulResponse) ReadWriteKeyCommand(org.infinispan.commands.functional.ReadWriteKeyCommand) ComputeIfAbsentCommand(org.infinispan.commands.write.ComputeIfAbsentCommand) LocalizedCacheTopology(org.infinispan.distribution.LocalizedCacheTopology) InvocationFinallyAction(org.infinispan.interceptors.InvocationFinallyAction) PutKeyValueCommand(org.infinispan.commands.write.PutKeyValueCommand) Entry(java.util.Map.Entry) WriteOnlyKeyCommand(org.infinispan.commands.functional.WriteOnlyKeyCommand) ReadWriteManyCommand(org.infinispan.commands.functional.ReadWriteManyCommand) DeliverOrder(org.infinispan.remoting.inboundhandler.DeliverOrder) SingletonMapResponseCollector(org.infinispan.remoting.transport.impl.SingletonMapResponseCollector)

Example 4 with SingletonMapResponseCollector

use of org.infinispan.remoting.transport.impl.SingletonMapResponseCollector in project infinispan by infinispan.

the class ScatteredDistributionInterceptor method visitReadOnlyManyCommand.

@Override
public Object visitReadOnlyManyCommand(InvocationContext ctx, ReadOnlyManyCommand command) throws Throwable {
    if (command.hasAnyFlag(FlagBitSets.CACHE_MODE_LOCAL | FlagBitSets.SKIP_REMOTE_LOOKUP)) {
        return handleLocalOnlyReadManyCommand(ctx, command, command.getKeys());
    }
    LocalizedCacheTopology cacheTopology = checkTopology(command);
    if (!ctx.isOriginLocal()) {
        return handleRemoteReadManyCommand(ctx, command, command.getKeys());
    }
    if (command.getKeys().isEmpty()) {
        return Stream.empty();
    }
    ConsistentHash ch = cacheTopology.getReadConsistentHash();
    int estimateForOneNode = 2 * command.getKeys().size() / ch.getMembers().size();
    Function<Address, List<Object>> createList = k -> new ArrayList<>(estimateForOneNode);
    Map<Address, List<Object>> requestedKeys = new HashMap<>();
    List<Object> localKeys = null;
    for (Object key : command.getKeys()) {
        if (ctx.lookupEntry(key) != null) {
            if (localKeys == null) {
                localKeys = new ArrayList<>();
            }
            localKeys.add(key);
            continue;
        }
        DistributionInfo info = cacheTopology.getDistribution(key);
        assert !info.isPrimary();
        if (info.primary() == null) {
            throw AllOwnersLostException.INSTANCE;
        }
        requestedKeys.computeIfAbsent(info.primary(), createList).add(key);
    }
    MergingCompletableFuture<Object> allFuture = new MergingCompletableFuture<>(requestedKeys.size() + (localKeys == null ? 0 : 1), new Object[command.getKeys().size()], Arrays::stream);
    int offset = 0;
    if (localKeys != null) {
        offset += localKeys.size();
        ReadOnlyManyCommand localCommand = new ReadOnlyManyCommand(command).withKeys(localKeys);
        invokeNextAndFinally(ctx, localCommand, (rCtx, rCommand, rv, throwable) -> {
            if (throwable != null) {
                allFuture.completeExceptionally(throwable);
            } else {
                try {
                    ((Stream) rv).collect(new ArrayCollector(allFuture.results));
                    allFuture.countDown();
                } catch (Throwable t) {
                    allFuture.completeExceptionally(t);
                }
            }
        });
    }
    for (Map.Entry<Address, List<Object>> addressKeys : requestedKeys.entrySet()) {
        List<Object> keysForAddress = addressKeys.getValue();
        ReadOnlyManyCommand remoteCommand = new ReadOnlyManyCommand(command).withKeys(keysForAddress);
        remoteCommand.setTopologyId(command.getTopologyId());
        Set<Address> target = Collections.singleton(addressKeys.getKey());
        int myOffset = offset;
        SingletonMapResponseCollector collector = SingletonMapResponseCollector.ignoreLeavers();
        CompletionStage<Map<Address, Response>> rpc = rpcManager.invokeCommand(target, remoteCommand, collector, rpcManager.getSyncRpcOptions());
        rpc.whenComplete((responseMap, throwable) -> {
            if (throwable != null) {
                allFuture.completeExceptionally(throwable);
                return;
            }
            SuccessfulResponse response = getSuccessfulResponseOrFail(responseMap, allFuture, rsp -> allFuture.completeExceptionally(rsp instanceof UnsureResponse ? OutdatedTopologyException.RETRY_NEXT_TOPOLOGY : AllOwnersLostException.INSTANCE));
            if (response == null) {
                return;
            }
            try {
                Object[] values = (Object[]) response.getResponseValue();
                if (values != null) {
                    System.arraycopy(values, 0, allFuture.results, myOffset, values.length);
                    allFuture.countDown();
                } else {
                    allFuture.completeExceptionally(new IllegalStateException("Unexpected response value " + response.getResponseValue()));
                }
            } catch (Throwable t) {
                allFuture.completeExceptionally(t);
            }
        });
        offset += keysForAddress.size();
    }
    return asyncValue(allFuture);
}
Also used : WriteCommand(org.infinispan.commands.write.WriteCommand) Arrays(java.util.Arrays) GetCacheEntryCommand(org.infinispan.commands.read.GetCacheEntryCommand) CacheNotFoundResponse(org.infinispan.remoting.responses.CacheNotFoundResponse) LogFactory(org.infinispan.util.logging.LogFactory) RemoteMetadata(org.infinispan.container.entries.RemoteMetadata) ClusteredGetAllCommand(org.infinispan.commands.remote.ClusteredGetAllCommand) Map(java.util.Map) RemoveCommand(org.infinispan.commands.write.RemoveCommand) ConsistentHash(org.infinispan.distribution.ch.ConsistentHash) EmbeddedMetadata(org.infinispan.metadata.EmbeddedMetadata) ReadWriteManyEntriesCommand(org.infinispan.commands.functional.ReadWriteManyEntriesCommand) UnsuccessfulResponse(org.infinispan.remoting.responses.UnsuccessfulResponse) Set(java.util.Set) GroupManager(org.infinispan.distribution.group.impl.GroupManager) CacheTopology(org.infinispan.topology.CacheTopology) ResponseCollector(org.infinispan.remoting.transport.ResponseCollector) DONT_LOAD(org.infinispan.commands.VisitableCommand.LoadType.DONT_LOAD) CompletionStage(java.util.concurrent.CompletionStage) Stream(java.util.stream.Stream) SuccessfulResponse(org.infinispan.remoting.responses.SuccessfulResponse) InternalCacheValue(org.infinispan.container.entries.InternalCacheValue) AbstractVisitor(org.infinispan.commands.AbstractVisitor) ArrayCollector(org.infinispan.commons.util.ArrayCollector) InternalCacheEntry(org.infinispan.container.entries.InternalCacheEntry) CacheEntryRemoved(org.infinispan.notifications.cachelistener.annotation.CacheEntryRemoved) PersistenceManager(org.infinispan.persistence.manager.PersistenceManager) ComputeCommand(org.infinispan.commands.write.ComputeCommand) MetadataAwareCommand(org.infinispan.commands.MetadataAwareCommand) EvictionManager(org.infinispan.eviction.EvictionManager) ReadOnlyKeyCommand(org.infinispan.commands.functional.ReadOnlyKeyCommand) ArrayList(java.util.ArrayList) WriteOnlyManyEntriesCommand(org.infinispan.commands.functional.WriteOnlyManyEntriesCommand) Start(org.infinispan.factories.annotations.Start) MapResponseCollector(org.infinispan.remoting.transport.impl.MapResponseCollector) PassthroughSingleResponseCollector(org.infinispan.remoting.transport.impl.PassthroughSingleResponseCollector) SingleResponseCollector(org.infinispan.remoting.transport.impl.SingleResponseCollector) DataWriteCommand(org.infinispan.commands.write.DataWriteCommand) FunctionalNotifier(org.infinispan.functional.impl.FunctionalNotifier) ValueMatcher(org.infinispan.commands.write.ValueMatcher) ClearCommand(org.infinispan.commands.write.ClearCommand) Address(org.infinispan.remoting.transport.Address) ExceptionResponse(org.infinispan.remoting.responses.ExceptionResponse) CacheEntry(org.infinispan.container.entries.CacheEntry) NotifyHelper(org.infinispan.notifications.cachelistener.NotifyHelper) WriteOnlyKeyValueCommand(org.infinispan.commands.functional.WriteOnlyKeyValueCommand) ValidResponse(org.infinispan.remoting.responses.ValidResponse) CacheNotifier(org.infinispan.notifications.cachelistener.CacheNotifier) Inject(org.infinispan.factories.annotations.Inject) ReadWriteKeyCommand(org.infinispan.commands.functional.ReadWriteKeyCommand) ReadWriteManyCommand(org.infinispan.commands.functional.ReadWriteManyCommand) NullCacheEntry(org.infinispan.container.entries.NullCacheEntry) AggregateCompletionStage(org.infinispan.util.concurrent.AggregateCompletionStage) ReplaceCommand(org.infinispan.commands.write.ReplaceCommand) EntryVersion(org.infinispan.container.versioning.EntryVersion) UnsureResponse(org.infinispan.remoting.responses.UnsureResponse) MultiTargetCollector(org.infinispan.util.concurrent.CommandAckCollector.MultiTargetCollector) GetKeysInGroupCommand(org.infinispan.commands.remote.GetKeysInGroupCommand) ActivationManager(org.infinispan.eviction.impl.ActivationManager) RepeatableReadEntry(org.infinispan.container.entries.RepeatableReadEntry) InvocationContext(org.infinispan.context.InvocationContext) CompletableFutures(org.infinispan.util.concurrent.CompletableFutures) OutdatedTopologyException(org.infinispan.statetransfer.OutdatedTopologyException) RpcOptions(org.infinispan.remoting.rpc.RpcOptions) Predicate(java.util.function.Predicate) Collection(java.util.Collection) ReadWriteKeyValueCommand(org.infinispan.commands.functional.ReadWriteKeyValueCommand) MetadataImmortalCacheEntry(org.infinispan.container.entries.metadata.MetadataImmortalCacheEntry) DataOperationOrderer(org.infinispan.util.concurrent.DataOperationOrderer) InequalVersionComparisonResult(org.infinispan.container.versioning.InequalVersionComparisonResult) InvocationSuccessFunction(org.infinispan.interceptors.InvocationSuccessFunction) List(java.util.List) SingletonMapResponseCollector(org.infinispan.remoting.transport.impl.SingletonMapResponseCollector) InvocationFinallyAction(org.infinispan.interceptors.InvocationFinallyAction) PutKeyValueCommand(org.infinispan.commands.write.PutKeyValueCommand) FlagAffectedCommand(org.infinispan.commands.FlagAffectedCommand) TopologyAffectedCommand(org.infinispan.commands.TopologyAffectedCommand) HashMap(java.util.HashMap) CompletableFuture(java.util.concurrent.CompletableFuture) Metadata(org.infinispan.metadata.Metadata) CompletionStages(org.infinispan.util.concurrent.CompletionStages) GetAllCommand(org.infinispan.commands.read.GetAllCommand) Function(java.util.function.Function) AllOwnersLostException(org.infinispan.statetransfer.AllOwnersLostException) FlagBitSets(org.infinispan.context.impl.FlagBitSets) KeyPartitioner(org.infinispan.distribution.ch.KeyPartitioner) ClusteredGetCommand(org.infinispan.commands.remote.ClusteredGetCommand) IracPutKeyValueCommand(org.infinispan.commands.write.IracPutKeyValueCommand) Log(org.infinispan.util.logging.Log) AbstractDataCommand(org.infinispan.commands.read.AbstractDataCommand) SegmentSpecificCommand(org.infinispan.commands.SegmentSpecificCommand) MetadataImmortalCacheValue(org.infinispan.container.entries.metadata.MetadataImmortalCacheValue) ResponseCollectors(org.infinispan.remoting.transport.ResponseCollectors) Response(org.infinispan.remoting.responses.Response) ClusteringInterceptor(org.infinispan.interceptors.impl.ClusteringInterceptor) GetKeyValueCommand(org.infinispan.commands.read.GetKeyValueCommand) CacheException(org.infinispan.commons.CacheException) Iterator(java.util.Iterator) EvictCommand(org.infinispan.commands.write.EvictCommand) WriteOnlyManyCommand(org.infinispan.commands.functional.WriteOnlyManyCommand) PutMapCommand(org.infinispan.commands.write.PutMapCommand) ReadOnlyManyCommand(org.infinispan.commands.functional.ReadOnlyManyCommand) ComputeIfAbsentCommand(org.infinispan.commands.write.ComputeIfAbsentCommand) LocalizedCacheTopology(org.infinispan.distribution.LocalizedCacheTopology) Configuration(org.infinispan.configuration.cache.Configuration) DistributionInfo(org.infinispan.distribution.DistributionInfo) Operation(org.infinispan.util.concurrent.DataOperationOrderer.Operation) WriteOnlyKeyCommand(org.infinispan.commands.functional.WriteOnlyKeyCommand) VisitableCommand(org.infinispan.commands.VisitableCommand) DeliverOrder(org.infinispan.remoting.inboundhandler.DeliverOrder) Collections(java.util.Collections) TimeService(org.infinispan.commons.time.TimeService) ScatteredVersionManager(org.infinispan.scattered.ScatteredVersionManager) ConsistentHash(org.infinispan.distribution.ch.ConsistentHash) ReadOnlyManyCommand(org.infinispan.commands.functional.ReadOnlyManyCommand) Address(org.infinispan.remoting.transport.Address) HashMap(java.util.HashMap) ArrayList(java.util.ArrayList) ArrayCollector(org.infinispan.commons.util.ArrayCollector) ArrayList(java.util.ArrayList) List(java.util.List) Stream(java.util.stream.Stream) SingletonMapResponseCollector(org.infinispan.remoting.transport.impl.SingletonMapResponseCollector) SuccessfulResponse(org.infinispan.remoting.responses.SuccessfulResponse) UnsureResponse(org.infinispan.remoting.responses.UnsureResponse) LocalizedCacheTopology(org.infinispan.distribution.LocalizedCacheTopology) DistributionInfo(org.infinispan.distribution.DistributionInfo) Arrays(java.util.Arrays) Map(java.util.Map) HashMap(java.util.HashMap)

Aggregations

ArrayList (java.util.ArrayList)3 Collection (java.util.Collection)3 HashMap (java.util.HashMap)3 List (java.util.List)3 Map (java.util.Map)3 Set (java.util.Set)3 CompletableFuture (java.util.concurrent.CompletableFuture)3 CompletionStage (java.util.concurrent.CompletionStage)3 ReadWriteKeyCommand (org.infinispan.commands.functional.ReadWriteKeyCommand)3 ReadWriteKeyValueCommand (org.infinispan.commands.functional.ReadWriteKeyValueCommand)3 ReadWriteManyCommand (org.infinispan.commands.functional.ReadWriteManyCommand)3 ReadWriteManyEntriesCommand (org.infinispan.commands.functional.ReadWriteManyEntriesCommand)3 WriteOnlyKeyCommand (org.infinispan.commands.functional.WriteOnlyKeyCommand)3 WriteOnlyKeyValueCommand (org.infinispan.commands.functional.WriteOnlyKeyValueCommand)3 WriteOnlyManyCommand (org.infinispan.commands.functional.WriteOnlyManyCommand)3 WriteOnlyManyEntriesCommand (org.infinispan.commands.functional.WriteOnlyManyEntriesCommand)3 ComputeCommand (org.infinispan.commands.write.ComputeCommand)3 SuccessfulResponse (org.infinispan.remoting.responses.SuccessfulResponse)3 SingletonMapResponseCollector (org.infinispan.remoting.transport.impl.SingletonMapResponseCollector)3 Arrays (java.util.Arrays)2