Class Cleaner
- java.lang.Object
-
- com.oracle.coherence.concurrent.internal.Cleaner
-
- All Implemented Interfaces:
com.tangosol.net.events.EventDispatcherAwareInterceptor<com.tangosol.net.events.partition.TransferEvent>,com.tangosol.net.events.EventInterceptor<com.tangosol.net.events.partition.TransferEvent>,com.tangosol.net.MemberListener,EventListener
public class Cleaner extends Object implements com.tangosol.net.MemberListener, com.tangosol.net.events.EventDispatcherAwareInterceptor<com.tangosol.net.events.partition.TransferEvent>
This Cleaner is triggered by members leaving the service or partitions arriving at this member, and is used to release locks and semaphore permits held by the departed members.- Author:
- Harvey Raja 2021.08.19, Aleks Seovic 2021.10.26
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected classCleaner.CheckHoldersRunnableARunnablethat fires anAsynchronousProcessorto validate lock holders.
-
Field Summary
Fields Modifier and Type Field Description protected com.tangosol.net.partition.PartitionSetm_partsCheckAPartitionSetto fire the check against.protected Stringm_sServiceNameThe service name.
-
Constructor Summary
Constructors Constructor Description Cleaner()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidenqueueUpdate(int iPartition, int cParts)Enqueue the provided partition and cache names for a 'clean up'.voidintroduceEventDispatcher(String sIdentifier, com.tangosol.net.events.EventDispatcher dispatcher)voidmemberJoined(com.tangosol.net.MemberEvent evt)voidmemberLeaving(com.tangosol.net.MemberEvent evt)voidmemberLeft(com.tangosol.net.MemberEvent evt)voidonEvent(com.tangosol.net.events.partition.TransferEvent event)
-
-
-
Field Detail
-
m_sServiceName
protected volatile String m_sServiceName
The service name.
-
m_partsCheck
protected volatile com.tangosol.net.partition.PartitionSet m_partsCheck
APartitionSetto fire the check against.
-
-
Method Detail
-
onEvent
public void onEvent(com.tangosol.net.events.partition.TransferEvent event)
- Specified by:
onEventin interfacecom.tangosol.net.events.EventInterceptor<com.tangosol.net.events.partition.TransferEvent>
-
introduceEventDispatcher
public void introduceEventDispatcher(String sIdentifier, com.tangosol.net.events.EventDispatcher dispatcher)
- Specified by:
introduceEventDispatcherin interfacecom.tangosol.net.events.EventDispatcherAwareInterceptor<com.tangosol.net.events.partition.TransferEvent>
-
memberJoined
public void memberJoined(com.tangosol.net.MemberEvent evt)
- Specified by:
memberJoinedin interfacecom.tangosol.net.MemberListener
-
memberLeaving
public void memberLeaving(com.tangosol.net.MemberEvent evt)
- Specified by:
memberLeavingin interfacecom.tangosol.net.MemberListener
-
memberLeft
public void memberLeft(com.tangosol.net.MemberEvent evt)
- Specified by:
memberLeftin interfacecom.tangosol.net.MemberListener
-
enqueueUpdate
protected void enqueueUpdate(int iPartition, int cParts)Enqueue the provided partition and cache names for a 'clean up'.The clean up is fired on a background thread allowing bundling of subsequently enqueued partitions. The background thread is fired 1s after the first enqueue.
- Parameters:
iPartition- the partition to enqueuecParts- the number of partitions in the associated service
-
-