Package org.infinispan.distribution.impl
Class L1ManagerImpl
- java.lang.Object
-
- org.infinispan.distribution.impl.L1ManagerImpl
-
- All Implemented Interfaces:
L1Manager
,RemoteValueRetrievedListener
public class L1ManagerImpl extends Object implements L1Manager, RemoteValueRetrievedListener
-
-
Constructor Summary
Constructors Constructor Description L1ManagerImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addRequestor(Object key, Address origin)
Records a request that will be cached in another nodes L1CompletableFuture<?>
flushCache(Collection<Object> keys, Address origin, boolean assumeOriginKeptEntryInL1)
void
registerL1WriteSynchronizer(Object key, L1WriteSynchronizer sync)
Registers the given write synchronizer to be notified whenever a remote value is looked up for the given key.void
remoteValueFound(InternalCacheEntry ice)
Invoked when a remote value is found from a remote sourcevoid
remoteValueNotFound(Object key)
Invoked when a remote value is not found from the remote source for the given keyvoid
start()
void
stop()
void
unregisterL1WriteSynchronizer(Object key, L1WriteSynchronizer sync)
Unregister the given write synchronizer if present.
-
-
-
Method Detail
-
start
public void start()
-
stop
public void stop()
-
addRequestor
public void addRequestor(Object key, Address origin)
Description copied from interface:L1Manager
Records a request that will be cached in another nodes L1- Specified by:
addRequestor
in interfaceL1Manager
-
flushCache
public CompletableFuture<?> flushCache(Collection<Object> keys, Address origin, boolean assumeOriginKeptEntryInL1)
- Specified by:
flushCache
in interfaceL1Manager
-
registerL1WriteSynchronizer
public void registerL1WriteSynchronizer(Object key, L1WriteSynchronizer sync)
Description copied from interface:L1Manager
Registers the given write synchronizer to be notified whenever a remote value is looked up for the given key. If the synchronizer is no longer needed to be signaled, the user should unregister it usingL1Manager.unregisterL1WriteSynchronizer(Object, org.infinispan.interceptors.distribution.L1WriteSynchronizer)
- Specified by:
registerL1WriteSynchronizer
in interfaceL1Manager
- Parameters:
key
- The key that that when looked up will trigger the synchronizersync
- The synchronizer to run the update when the key is looked up
-
unregisterL1WriteSynchronizer
public void unregisterL1WriteSynchronizer(Object key, L1WriteSynchronizer sync)
Description copied from interface:L1Manager
Unregister the given write synchronizer if present. Note the synchronizer is only unregistered if it matches using instance equality (==) due to possibly concurrent usage of write synchronizers- Specified by:
unregisterL1WriteSynchronizer
in interfaceL1Manager
- Parameters:
key
- The key to unregister the given synchronizer for.sync
- The synchronizer to be removed if it is still present.
-
remoteValueFound
public void remoteValueFound(InternalCacheEntry ice)
Description copied from interface:RemoteValueRetrievedListener
Invoked when a remote value is found from a remote source- Specified by:
remoteValueFound
in interfaceRemoteValueRetrievedListener
- Parameters:
ice
- The cache entry that was found
-
remoteValueNotFound
public void remoteValueNotFound(Object key)
Description copied from interface:RemoteValueRetrievedListener
Invoked when a remote value is not found from the remote source for the given key- Specified by:
remoteValueNotFound
in interfaceRemoteValueRetrievedListener
- Parameters:
key
- The key for which there was no value found
-
-