Class DenylistLatch
java.lang.Object
org.apache.felix.eventadmin.impl.tasks.DenylistLatch
public class DenylistLatch
extends java.lang.Object
A latch that checks handlers for denying on an interval.
-
Constructor Summary
Constructors Constructor Description DenylistLatch(int count, long timeout) -
Method Summary
Modifier and Type Method Description voidaddToDenylistCheck(HandlerTask task)Adds a handler task to the timeout based deny list checking.voidawaitAndDenylistCheck()Causes current thread to wait until each handler has called countDown.voidcountDown()Count down the number of handlers blocking event completion.
-
Constructor Details
-
DenylistLatch
public DenylistLatch(int count, long timeout)- Parameters:
count- Number of handlers that must call countdowntimeout- Timeout in Milliseconds to check for denying handlers
-
-
Method Details
-
countDown
public void countDown()Count down the number of handlers blocking event completion. -
addToDenylistCheck
Adds a handler task to the timeout based deny list checking.- Parameters:
task- The handler task
-
awaitAndDenylistCheck
public void awaitAndDenylistCheck()Causes current thread to wait until each handler has called countDown. Checks on timeout interval to determine if a handler needs deny listing.
-