alma::acs::daemontest::DaemonCallbackImpl Class Reference

Inheritance diagram for alma::acs::daemontest::DaemonCallbackImpl:
Inheritance graph
[legend]
Collaboration diagram for alma::acs::daemontest::DaemonCallbackImpl:
Collaboration graph
[legend]

List of all members.

Public Member Functions

void done (Completion comp)
void working (Completion comp)

Package Functions

 DaemonCallbackImpl (Logger logger)
void prepareWaitForDone (String srvName)
boolean waitForDone (long timeout, TimeUnit unit) throws InterruptedException
Completion getLastDoneCompletion ()

Private Member Functions

String isoDateFromOmgTime (long omgTime)

Private Attributes

final Logger logger
volatile String srvName
volatile CountDownLatch syncDone
volatile Completion lastDoneCompletion

Constructor & Destructor Documentation

alma::acs::daemontest::DaemonCallbackImpl::DaemonCallbackImpl ( Logger  logger  )  [inline, package]

Member Function Documentation

void alma::acs::daemontest::DaemonCallbackImpl::done ( Completion  comp  )  [inline]
Completion alma::acs::daemontest::DaemonCallbackImpl::getLastDoneCompletion (  )  [inline, package]
String alma::acs::daemontest::DaemonCallbackImpl::isoDateFromOmgTime ( long  omgTime  )  [inline, private]

Referenced by done(), and working().

void alma::acs::daemontest::DaemonCallbackImpl::prepareWaitForDone ( String  srvName  )  [inline, package]

Must be called before the call that can trigger the callback to done(Completion) and before waitForDone(long, TimeUnit), so as to (re-)activate waiting for the done callback. This ensures that we don't miss the done callback even if it occurs faster than the client thread can call waitForDone.

Parameters:
srvName used for logging the working and done calls

References syncDone.

Referenced by alma::acs::daemontest::ServicesDaemonTest::testNamingSrvStartStopCheckCallback(), alma::acs::daemontest::ServicesDaemonTest::testStartAcsServiceIndividually(), and alma::acs::daemontest::ServicesDaemonTest::testStartServiceTwice().

boolean alma::acs::daemontest::DaemonCallbackImpl::waitForDone ( long  timeout,
TimeUnit  unit 
) throws InterruptedException [inline, package]

prepareWaitForDone() must be called first.

Returns:
false if the waiting time elapsed before the done() method was called.
See also:
CountDownLatch::await(long, TimeUnit)

References syncDone.

Referenced by alma::acs::daemontest::ServicesDaemonTest::testNamingSrvStartStopCheckCallback(), alma::acs::daemontest::ServicesDaemonTest::testStartAcsServiceIndividually(), and alma::acs::daemontest::ServicesDaemonTest::testStartServiceTwice().

void alma::acs::daemontest::DaemonCallbackImpl::working ( Completion  comp  )  [inline]

Member Data Documentation

Referenced by done(), and getLastDoneCompletion().

Referenced by done(), and working().

Referenced by done(), and working().

volatile CountDownLatch alma::acs::daemontest::DaemonCallbackImpl::syncDone [private]

The documentation for this class was generated from the following file:

Generated by  doxygen 1.6.2