Class ExternalProcessReaper
- java.lang.Object
-
- com.levigo.jadice.server.core.util.housekeeping.AbstractReaper<ExternalProcessReaper.PIDGroup>
-
- com.levigo.jadice.server.core.util.housekeeping.ExternalProcessReaper
-
- All Implemented Interfaces:
SelfRegistering
,Runnable
,org.springframework.beans.factory.DisposableBean
,org.springframework.beans.factory.InitializingBean
,org.springframework.jmx.export.naming.SelfNaming
@ManagedResource("Reaper for external processes") public class ExternalProcessReaper extends AbstractReaper<ExternalProcessReaper.PIDGroup>
A reaper that can terminate external processes by force. These processes are defined by their process ID (PID).If there are several potential PIDs that this process might have the reaper keeps tracks of them in a
ExternalProcessReaper.PIDGroup
until it is not ambiguous anymore which one to kill. There are two possibilities:- The
ExternalProcessReaper.PIDGroup
shrinks by terminating the processes in other ways until only one PID is left. - More
ExternalProcessReaper.PIDGroup
s getenqueued
until the number of identicalExternalProcessReaper.PIDGroup
is the same as the number of PIDs tracked.
- Since:
- jadice server 5.1.0.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ExternalProcessReaper.PIDGroup
protected static class
ExternalProcessReaper.UnixPIDGroup
protected static class
ExternalProcessReaper.WindowsPIDGroup
-
Constructor Summary
Constructors Constructor Description ExternalProcessReaper()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ExternalProcessReaper.PIDGroup
createPIDGroup(Collection<Integer> pids)
protected org.jadice.util.log.Logger
getLogger()
protected String
getName()
protected void
reapAllObjectsOnShutdown()
protected boolean
reapObject(ExternalProcessReaper.PIDGroup pidGroup, int attempt)
-
Methods inherited from class com.levigo.jadice.server.core.util.housekeeping.AbstractReaper
afterPropertiesSet, destroy, enqueue, enqueue, getEnqueuedObjectCount, getEnqueuedObjects, getObjectName, getReapedObjectCount, getTimeInterval, run, setTimeInterval
-
-
-
-
Method Detail
-
createPIDGroup
public static ExternalProcessReaper.PIDGroup createPIDGroup(Collection<Integer> pids)
-
reapObject
protected boolean reapObject(ExternalProcessReaper.PIDGroup pidGroup, int attempt)
- Specified by:
reapObject
in classAbstractReaper<ExternalProcessReaper.PIDGroup>
-
reapAllObjectsOnShutdown
protected void reapAllObjectsOnShutdown()
- Specified by:
reapAllObjectsOnShutdown
in classAbstractReaper<ExternalProcessReaper.PIDGroup>
-
getName
protected String getName()
- Specified by:
getName
in classAbstractReaper<ExternalProcessReaper.PIDGroup>
-
getLogger
protected org.jadice.util.log.Logger getLogger()
- Specified by:
getLogger
in classAbstractReaper<ExternalProcessReaper.PIDGroup>
-
-