Interface ClusteringDependentLogic
-
- All Known Implementing Classes:
ClusteringDependentLogic.AbstractClusteringDependentLogic,ClusteringDependentLogic.DistributionLogic,ClusteringDependentLogic.InvalidationLogic,ClusteringDependentLogic.LocalLogic,ClusteringDependentLogic.ReplicationLogic,ClusteringDependentLogic.ScatteredLogic,OrderedClusteringDependentLogic
public interface ClusteringDependentLogicAbstractization for logic related to different clustering modes: replicated or distributed. This implements the Bridge pattern as described by the GoF: this plays the role of the Implementor and various LockingInterceptors are the Abstraction.- Author:
- Mircea Markus, Pedro Ruivo
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classClusteringDependentLogic.AbstractClusteringDependentLogicstatic classClusteringDependentLogic.Commitstatic classClusteringDependentLogic.DistributionLogicThis logic is used in distributed mode caches.static classClusteringDependentLogic.InvalidationLogicThis logic is used in invalidation mode caches.static classClusteringDependentLogic.LocalLogicThis logic is used in local mode caches.static classClusteringDependentLogic.ReplicationLogicThis logic is used in replicated mode caches.static classClusteringDependentLogic.ScatteredLogic
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description java.util.concurrent.CompletionStage<java.lang.Void>commitEntry(CacheEntry entry, org.infinispan.commands.FlagAffectedCommand command, InvocationContext ctx, Flag trackFlag, boolean l1Invalidation)Commits the entry to the data container.ClusteringDependentLogic.CommitcommitType(org.infinispan.commands.FlagAffectedCommand command, InvocationContext ctx, int segment, boolean removed)Determines what type of commit this is.java.util.concurrent.CompletionStage<EntryVersionsMap>createNewVersionsAndCheckForWriteSkews(VersionGenerator versionGenerator, org.infinispan.context.impl.TxInvocationContext context, org.infinispan.commands.tx.VersionedPrepareCommand prepareCommand)AddressgetAddress()LocalizedCacheTopologygetCacheTopology()default java.util.Collection<Address>getOwners(java.lang.Object key)Deprecated.Since 9.0, please usegetCacheTopology().getWriteOwners(key)instead.default java.util.Collection<Address>getOwners(java.util.Collection<java.lang.Object> keys)Deprecated.Since 9.0, please usegetCacheTopology().getWriteOwners(keys)instead.default AddressgetPrimaryOwner(java.lang.Object key)Deprecated.Since 9.0, please usegetCacheTopology().getDistributionInfo(key).primary()instead.default booleanlocalNodeIsOwner(java.lang.Object key)Deprecated.Since 9.0, please usegetCacheTopology().isWriteOwner(key)instead.default booleanlocalNodeIsPrimaryOwner(java.lang.Object key)Deprecated.Since 9.0, please usegetCacheTopology().getDistribution(key).isPrimary()instead.voidstart()Starts the object - must be first wired via component registry
-
-
-
Method Detail
-
start
void start()
Starts the object - must be first wired via component registry
-
getCacheTopology
LocalizedCacheTopology getCacheTopology()
- Returns:
- information about the location of keys.
-
localNodeIsOwner
@Deprecated default boolean localNodeIsOwner(java.lang.Object key)
Deprecated.Since 9.0, please usegetCacheTopology().isWriteOwner(key)instead.
-
localNodeIsPrimaryOwner
@Deprecated default boolean localNodeIsPrimaryOwner(java.lang.Object key)
Deprecated.Since 9.0, please usegetCacheTopology().getDistribution(key).isPrimary()instead.
-
getPrimaryOwner
@Deprecated default Address getPrimaryOwner(java.lang.Object key)
Deprecated.Since 9.0, please usegetCacheTopology().getDistributionInfo(key).primary()instead.
-
commitEntry
java.util.concurrent.CompletionStage<java.lang.Void> commitEntry(CacheEntry entry, org.infinispan.commands.FlagAffectedCommand command, InvocationContext ctx, Flag trackFlag, boolean l1Invalidation)
Commits the entry to the data container. The commit operation is always done synchronously in the current thread. However notifications for said operations can be performed asynchronously and the returned CompletionStage will complete when the notifications if any are completed.- Parameters:
entry-command-ctx-trackFlag-l1Invalidation-- Returns:
- completion stage that is complete when all notifications for the commit are complete or null if already complete
-
commitType
ClusteringDependentLogic.Commit commitType(org.infinispan.commands.FlagAffectedCommand command, InvocationContext ctx, int segment, boolean removed)
Determines what type of commit this is. Whether we shouldn't commit, or if this is a commit due to owning the key or not- Parameters:
command-ctx-segment- if 0 or greater assumes the underlying container is segmented.removed-- Returns:
-
getOwners
@Deprecated default java.util.Collection<Address> getOwners(java.util.Collection<java.lang.Object> keys)
Deprecated.Since 9.0, please usegetCacheTopology().getWriteOwners(keys)instead.
-
getOwners
@Deprecated default java.util.Collection<Address> getOwners(java.lang.Object key)
Deprecated.Since 9.0, please usegetCacheTopology().getWriteOwners(key)instead.
-
createNewVersionsAndCheckForWriteSkews
java.util.concurrent.CompletionStage<EntryVersionsMap> createNewVersionsAndCheckForWriteSkews(VersionGenerator versionGenerator, org.infinispan.context.impl.TxInvocationContext context, org.infinispan.commands.tx.VersionedPrepareCommand prepareCommand)
-
getAddress
Address getAddress()
-
-