Class MyGearmanWorkerImpl

java.lang.Object
hudson.plugins.gearman.MyGearmanWorkerImpl
All Implemented Interfaces:
org.gearman.common.GearmanSessionEventHandler

public class MyGearmanWorkerImpl extends Object implements org.gearman.common.GearmanSessionEventHandler
  • Constructor Details

  • Method Details

    • reconnect

      public void reconnect()
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • setFunctions

      public void setFunctions(Set<org.gearman.worker.GearmanFunctionFactory> functions)
    • getRegisteredFunctions

      public Set getRegisteredFunctions()
      This is a small lie -- it only returns the functions it has been instructed to register, not the ones it has actually gotton around to registering. This is mostly here for tests.
    • enqueueNoopEvent

      public void enqueueNoopEvent()
    • work

      public void work()
    • handleSessionEvent

      public void handleSessionEvent(org.gearman.common.GearmanSessionEvent event) throws IllegalArgumentException, IllegalStateException
      Specified by:
      handleSessionEvent in interface org.gearman.common.GearmanSessionEventHandler
      Throws:
      IllegalArgumentException
      IllegalStateException
    • enqueueEvent

      public void enqueueEvent(org.gearman.common.GearmanSessionEvent event)
    • addServer

      public boolean addServer(String host, int port)
    • addServer

      public boolean addServer(org.gearman.common.GearmanJobServerConnection conn) throws IllegalArgumentException, IllegalStateException
      Throws:
      IllegalArgumentException
      IllegalStateException
    • setWorkerID

      public void setWorkerID(String id) throws IllegalArgumentException
      Throws:
      IllegalArgumentException
    • getWorkerID

      public String getWorkerID()
    • stop

      public void stop()
    • shutdown

      public List<Exception> shutdown()
    • isRunning

      public boolean isRunning()
    • setJobUniqueIdRequired

      public void setJobUniqueIdRequired(boolean requiresJobUUID)
    • isJobUniqueIdRequired

      public boolean isJobUniqueIdRequired()