Package hudson.plugins.gearman
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
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionMyGearmanWorkerImpl(AvailabilityMonitor availability) MyGearmanWorkerImpl(ExecutorService executorService, AvailabilityMonitor availability) -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanaddServer(org.gearman.common.GearmanJobServerConnection conn) voidenqueueEvent(org.gearman.common.GearmanSessionEvent event) voidThis 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.voidhandleSessionEvent(org.gearman.common.GearmanSessionEvent event) booleanbooleanvoidvoidsetFunctions(Set<org.gearman.worker.GearmanFunctionFactory> functions) voidsetJobUniqueIdRequired(boolean requiresJobUUID) voidsetWorkerID(String id) shutdown()voidstop()toString()voidwork()
-
Constructor Details
-
MyGearmanWorkerImpl
-
MyGearmanWorkerImpl
-
-
Method Details
-
reconnect
public void reconnect() -
toString
-
setFunctions
-
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:
handleSessionEventin interfaceorg.gearman.common.GearmanSessionEventHandler- Throws:
IllegalArgumentExceptionIllegalStateException
-
enqueueEvent
public void enqueueEvent(org.gearman.common.GearmanSessionEvent event) -
addServer
-
addServer
public boolean addServer(org.gearman.common.GearmanJobServerConnection conn) throws IllegalArgumentException, IllegalStateException -
setWorkerID
- Throws:
IllegalArgumentException
-
getWorkerID
-
stop
public void stop() -
shutdown
-
isRunning
public boolean isRunning() -
setJobUniqueIdRequired
public void setJobUniqueIdRequired(boolean requiresJobUUID) -
isJobUniqueIdRequired
public boolean isJobUniqueIdRequired()
-