Class GuardedMethodInvokerImpl

java.lang.Object
org.hawaiiframework.util.semaphore.GuardedMethodInvokerImpl
All Implemented Interfaces:
GuardedMethodInvoker

public class GuardedMethodInvokerImpl extends Object implements GuardedMethodInvoker
Default implementation of GuardedMethodInvoker.
  • Constructor Details

    • GuardedMethodInvokerImpl

      public GuardedMethodInvokerImpl()
      The constructor.
    • GuardedMethodInvokerImpl

      public GuardedMethodInvokerImpl(Semaphore semaphore)
      Constructor an instance with a given semaphore.
  • Method Details

    • invokeIfNotActive

      public boolean invokeIfNotActive(Invocable invocation)
      Description copied from interface: GuardedMethodInvoker
      Invoke the invocation if it's not active.
      Specified by:
      invokeIfNotActive in interface GuardedMethodInvoker
      Parameters:
      invocation - The method to invoke.
      Returns:
      true if the invocation was attempted, false if another invocation was active.