Class BaseDistributionInterceptor

    • Field Detail

      • expirationManager

        protected org.infinispan.expiration.impl.InternalExpirationManager<java.lang.Object,​java.lang.Object> expirationManager
      • isL1Enabled

        protected boolean isL1Enabled
      • isReplicated

        protected boolean isReplicated
    • Constructor Detail

      • BaseDistributionInterceptor

        public BaseDistributionInterceptor()
    • Method Detail

      • getLog

        protected org.infinispan.util.logging.Log getLog()
        Specified by:
        getLog in class org.infinispan.interceptors.impl.BaseRpcInterceptor
      • configure

        public void configure()
      • visitSizeCommand

        public java.lang.Object visitSizeCommand​(InvocationContext ctx,
                                                 org.infinispan.commands.read.SizeCommand command)
                                          throws java.lang.Throwable
        Specified by:
        visitSizeCommand in interface org.infinispan.commands.Visitor
        Overrides:
        visitSizeCommand in class DDAsyncInterceptor
        Throws:
        java.lang.Throwable
      • visitGetKeysInGroupCommand

        public final java.lang.Object visitGetKeysInGroupCommand​(InvocationContext ctx,
                                                                 org.infinispan.commands.remote.GetKeysInGroupCommand command)
                                                          throws java.lang.Throwable
        Specified by:
        visitGetKeysInGroupCommand in interface org.infinispan.commands.Visitor
        Overrides:
        visitGetKeysInGroupCommand in class DDAsyncInterceptor
        Throws:
        java.lang.Throwable
      • visitClearCommand

        public final java.lang.Object visitClearCommand​(InvocationContext ctx,
                                                        org.infinispan.commands.write.ClearCommand command)
                                                 throws java.lang.Throwable
        Specified by:
        visitClearCommand in interface org.infinispan.commands.Visitor
        Overrides:
        visitClearCommand in class DDAsyncInterceptor
        Throws:
        java.lang.Throwable
      • retrieveDistributionInfo

        protected DistributionInfo retrieveDistributionInfo​(LocalizedCacheTopology topology,
                                                            org.infinispan.commands.ReplicableCommand command,
                                                            java.lang.Object key)
      • remoteGetSingleKey

        protected <C extends org.infinispan.commands.FlagAffectedCommand & org.infinispan.commands.TopologyAffectedCommand> java.util.concurrent.CompletionStage<java.lang.Void> remoteGetSingleKey​(InvocationContext ctx,
                                                                                                                                                                                                    C command,
                                                                                                                                                                                                    java.lang.Object key,
                                                                                                                                                                                                    boolean isWrite)
        Fetch a key from its remote owners and store it in the context. Not thread-safe. The invocation context should not be accessed concurrently from multiple threads, so this method should only be used for single-key commands.
      • wrapRemoteEntry

        protected void wrapRemoteEntry​(InvocationContext ctx,
                                       java.lang.Object key,
                                       CacheEntry ice,
                                       boolean isWrite)
      • handleNonTxWriteCommand

        protected final java.lang.Object handleNonTxWriteCommand​(InvocationContext ctx,
                                                                 org.infinispan.commands.write.AbstractDataWriteCommand command)
                                                          throws java.lang.Throwable
        Throws:
        java.lang.Throwable
      • checkTopologyId

        protected LocalizedCacheTopology checkTopologyId​(org.infinispan.commands.TopologyAffectedCommand command)
      • visitGetAllCommand

        public java.lang.Object visitGetAllCommand​(InvocationContext ctx,
                                                   org.infinispan.commands.read.GetAllCommand command)
                                            throws java.lang.Throwable
        Specified by:
        visitGetAllCommand in interface org.infinispan.commands.Visitor
        Overrides:
        visitGetAllCommand in class DDAsyncInterceptor
        Throws:
        java.lang.Throwable
      • remoteGetMany

        protected <C extends org.infinispan.commands.FlagAffectedCommand & org.infinispan.commands.TopologyAffectedCommand> java.util.concurrent.CompletionStage<java.lang.Void> remoteGetMany​(InvocationContext ctx,
                                                                                                                                                                                               C command,
                                                                                                                                                                                               java.util.Collection<?> keys)
      • handleRemotelyRetrievedKeys

        protected void handleRemotelyRetrievedKeys​(InvocationContext ctx,
                                                   org.infinispan.commands.write.WriteCommand appliedCommand,
                                                   java.util.List<?> remoteKeys)
      • visitReadOnlyManyCommand

        public java.lang.Object visitReadOnlyManyCommand​(InvocationContext ctx,
                                                         org.infinispan.commands.functional.ReadOnlyManyCommand command)
                                                  throws java.lang.Throwable
        Specified by:
        visitReadOnlyManyCommand in interface org.infinispan.commands.Visitor
        Overrides:
        visitReadOnlyManyCommand in class DDAsyncInterceptor
        Throws:
        java.lang.Throwable
      • wrapFunctionalManyResultOnNonOrigin

        protected java.lang.Object wrapFunctionalManyResultOnNonOrigin​(InvocationContext rCtx,
                                                                       java.util.Collection<?> keys,
                                                                       java.lang.Object[] values)
      • unwrapFunctionalManyResultOnOrigin

        protected java.lang.Object[] unwrapFunctionalManyResultOnOrigin​(InvocationContext ctx,
                                                                        java.util.List<java.lang.Object> keys,
                                                                        java.lang.Object responseValue)
      • visitGetKeyValueCommand

        public java.lang.Object visitGetKeyValueCommand​(InvocationContext ctx,
                                                        org.infinispan.commands.read.GetKeyValueCommand command)
                                                 throws java.lang.Throwable
        Specified by:
        visitGetKeyValueCommand in interface org.infinispan.commands.Visitor
        Overrides:
        visitGetKeyValueCommand in class DDAsyncInterceptor
        Throws:
        java.lang.Throwable
      • visitGetCacheEntryCommand

        public java.lang.Object visitGetCacheEntryCommand​(InvocationContext ctx,
                                                          org.infinispan.commands.read.GetCacheEntryCommand command)
                                                   throws java.lang.Throwable
        Specified by:
        visitGetCacheEntryCommand in interface org.infinispan.commands.Visitor
        Overrides:
        visitGetCacheEntryCommand in class DDAsyncInterceptor
        Throws:
        java.lang.Throwable
      • visitReadOnlyKeyCommand

        public java.lang.Object visitReadOnlyKeyCommand​(InvocationContext ctx,
                                                        org.infinispan.commands.functional.ReadOnlyKeyCommand command)
                                                 throws java.lang.Throwable
        Specified by:
        visitReadOnlyKeyCommand in interface org.infinispan.commands.Visitor
        Overrides:
        visitReadOnlyKeyCommand in class DDAsyncInterceptor
        Throws:
        java.lang.Throwable
      • remoteReadOnlyCommand

        protected org.infinispan.commands.functional.ReadOnlyKeyCommand remoteReadOnlyCommand​(InvocationContext ctx,
                                                                                              org.infinispan.commands.functional.ReadOnlyKeyCommand command)
      • wrapFunctionalResultOnNonOriginOnReturn

        protected java.lang.Object wrapFunctionalResultOnNonOriginOnReturn​(java.lang.Object rv,
                                                                           CacheEntry entry)
      • unwrapFunctionalResultOnOrigin

        protected java.lang.Object unwrapFunctionalResultOnOrigin​(InvocationContext ctx,
                                                                  java.lang.Object key,
                                                                  java.lang.Object responseValue)
      • invokeRemotely

        protected java.lang.Object invokeRemotely​(InvocationContext ctx,
                                                  org.infinispan.commands.write.DataWriteCommand command,
                                                  Address primaryOwner)
      • readNeedsRemoteValue

        protected boolean readNeedsRemoteValue​(org.infinispan.commands.FlagAffectedCommand command)
        Returns:
        true if the value is not available on the local node and a read command is allowed to fetch it from a remote node. Does not check if the value is already in the context.