Class Cleaner
- java.lang.Object
-
- com.oracle.coherence.concurrent.internal.Cleaner
-
- All Implemented Interfaces:
EventDispatcherAwareInterceptor<TransferEvent>,EventInterceptor<TransferEvent>,MemberListener,EventListener
public class Cleaner extends Object implements MemberListener, EventDispatcherAwareInterceptor<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 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, EventDispatcher dispatcher)voidmemberJoined(MemberEvent evt)voidmemberLeaving(MemberEvent evt)voidmemberLeft(MemberEvent evt)voidonEvent(TransferEvent event)
-
-
-
Field Detail
-
m_sServiceName
protected volatile String m_sServiceName
The service name.
-
m_partsCheck
protected volatile PartitionSet m_partsCheck
APartitionSetto fire the check against.
-
-
Method Detail
-
onEvent
public void onEvent(TransferEvent event)
- Specified by:
onEventin interfaceEventInterceptor<TransferEvent>
-
introduceEventDispatcher
public void introduceEventDispatcher(String sIdentifier, EventDispatcher dispatcher)
- Specified by:
introduceEventDispatcherin interfaceEventDispatcherAwareInterceptor<TransferEvent>
-
memberJoined
public void memberJoined(MemberEvent evt)
- Specified by:
memberJoinedin interfaceMemberListener
-
memberLeaving
public void memberLeaving(MemberEvent evt)
- Specified by:
memberLeavingin interfaceMemberListener
-
memberLeft
public void memberLeft(MemberEvent evt)
- Specified by:
memberLeftin interfaceMemberListener
-
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
-
-