|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.activemq.util.ServiceSupport
org.apache.activemq.broker.LockableServiceSupport
public abstract class LockableServiceSupport
Helper class for working with services that requires locking
| Constructor Summary | |
|---|---|
LockableServiceSupport()
|
|
| Method Summary | |
|---|---|
Locker |
getLocker()
|
ScheduledThreadPoolExecutor |
getScheduledThreadPoolExecutor()
|
abstract void |
init()
Initialize resources before locking |
protected void |
keepLockAlive()
|
void |
postStop(ServiceStopper stopper)
handle for various operations after stopping the service (like locking) |
void |
preStart()
handle for various operations before starting the service (like locking) |
void |
setBrokerService(BrokerService brokerService)
|
void |
setLocker(Locker locker)
Set locker to be used |
void |
setLockKeepAlivePeriod(long lockKeepAlivePeriod)
Period (in milliseconds) on which Locker.keepAlive() should be checked |
void |
setUseLock(boolean useLock)
Turn locking on/off on the resource |
protected void |
stopBroker()
|
| Methods inherited from class org.apache.activemq.util.ServiceSupport |
|---|
addServiceListener, dispose, doStart, doStop, isStarted, isStopped, isStopping, removeServiceListener, start, stop |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.apache.activemq.broker.Lockable |
|---|
createDefaultLocker |
| Constructor Detail |
|---|
public LockableServiceSupport()
| Method Detail |
|---|
public abstract void init()
throws Exception
Exceptionpublic void setUseLock(boolean useLock)
Lockable
setUseLock in interface Lockable
public void setLocker(Locker locker)
throws IOException
Lockable
setLocker in interface LockableIOException
public Locker getLocker()
throws IOException
IOExceptionpublic void setLockKeepAlivePeriod(long lockKeepAlivePeriod)
LockableLocker.keepAlive() should be checked
setLockKeepAlivePeriod in interface Lockable
public void preStart()
throws Exception
ServiceSupport
preStart in class ServiceSupportException
public void postStop(ServiceStopper stopper)
throws Exception
ServiceSupport
postStop in class ServiceSupportExceptionprotected void keepLockAlive()
protected void stopBroker()
public ScheduledThreadPoolExecutor getScheduledThreadPoolExecutor()
public void setBrokerService(BrokerService brokerService)
setBrokerService in interface BrokerServiceAware
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||