Package com.devebot.opflow.services
Class OpflowRestrictorMaster
java.lang.Object
com.devebot.opflow.OpflowRestrictable.Filter
com.devebot.opflow.OpflowRestrictable.Runner
com.devebot.opflow.services.OpflowRestrictorMaster
- All Implemented Interfaces:
AutoCloseable
public class OpflowRestrictorMaster extends OpflowRestrictable.Runner implements AutoCloseable
- Author:
- cuoi
-
Field Summary
Fields Modifier and Type Field Description protected StringcomponentIdprotected OpflowLogTracerlogTracerprotected OpflowPromMeasurermeasurer -
Constructor Summary
Constructors Constructor Description OpflowRestrictorMaster(Map<String,Object> options) -
Method Summary
Modifier and Type Method Description voidblock()voidclose()StringgetComponentId()longgetPauseDuration()longgetPauseElapsed()longgetPauseTimeout()intgetSemaphoreLimit()intgetSemaphorePermits()longgetSemaphoreTimeout()OpflowRestrictor.ValvegetValveRestrictor()booleanisActive()booleanisBlocked()booleanisPaused()booleanisPauseEnabled()booleanisSemaphoreEnabled()Map<String,Object>pause(long duration)voidsetActive(boolean enabled)voidunblock()Map<String,Object>unpause()
-
Field Details
-
Constructor Details
-
Method Details
-
getComponentId
-
getValveRestrictor
-
isActive
public boolean isActive() -
setActive
public void setActive(boolean enabled) -
isBlocked
public boolean isBlocked() -
block
public void block() -
unblock
public void unblock() -
isPauseEnabled
public boolean isPauseEnabled() -
getPauseTimeout
public long getPauseTimeout() -
getPauseDuration
public long getPauseDuration() -
getPauseElapsed
public long getPauseElapsed() -
isPaused
public boolean isPaused() -
pause
-
unpause
-
getSemaphoreLimit
public int getSemaphoreLimit() -
getSemaphorePermits
public int getSemaphorePermits() -
isSemaphoreEnabled
public boolean isSemaphoreEnabled() -
getSemaphoreTimeout
public long getSemaphoreTimeout() -
close
public void close()- Specified by:
closein interfaceAutoCloseable
-