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 TypeMethodDescriptionboolean
boolean
addServer
(org.gearman.common.GearmanJobServerConnection conn) void
enqueueEvent
(org.gearman.common.GearmanSessionEvent event) void
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.void
handleSessionEvent
(org.gearman.common.GearmanSessionEvent event) boolean
boolean
void
void
setFunctions
(Set<org.gearman.worker.GearmanFunctionFactory> functions) void
setJobUniqueIdRequired
(boolean requiresJobUUID) void
setWorkerID
(String id) shutdown()
void
stop()
toString()
void
work()
-
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:
handleSessionEvent
in interfaceorg.gearman.common.GearmanSessionEventHandler
- Throws:
IllegalArgumentException
IllegalStateException
-
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()
-