|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public static interface JobLockService.JobLockRefreshCallback
Interface for implementations that need a timed callback in order to refresh the lock.
This callback is designed for processes that need to lock and wait for external processes to complete; keeping a local thread to refresh the lock is possible but it is more efficient for the thread pool and timer mechanisms to be shared. The callback implementations must be thread-safe and should be independent of other callbacks i.e. the simplest and safest is to use an anonymous inner class for the implementation. IMPORTANT: Do not block the calls to this interface - other callbacks might be held up producing inconsistent behaviour. Failure to observe this will lead to warnings and lock termination i.e. the service implementation will force early termination of the lock and will discard the callback.
Method Summary | |
---|---|
boolean |
isActive()
Timed callback from the service to determine if the lock is still required. |
void |
lockReleased()
Callback received when the lock refresh has failed. |
Method Detail |
---|
boolean isActive()
void lockReleased()
active
.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |