use of alma.maciErrType.wrappers.AcsJComponentCleanUpEx in project ACS by ACS-Community.
the class CounterConsumerImpl method cleanUp.
@Override
public void cleanUp() throws AcsJComponentCleanUpEx {
if (subscriber != null) {
m_logger.info("cleanUp() called, disconnecting from channel " + alma.COUNTER.CHANNELNAME_COUNTER.value);
StopWatch sw = new StopWatch();
try {
subscriber.disconnect();
subscriber = null;
} catch (Exception ex) {
// could be IllegalStateException if the consumer is already disconnected.
throw new AcsJComponentCleanUpEx(ex);
}
long disconnectTimeMillis = sw.getLapTimeMillis();
if (disconnectTimeMillis > 600) {
m_logger.info("Suspiciously slow NC disconnect in " + disconnectTimeMillis + " ms.");
}
} else {
m_logger.info("cleanUp() called..., nothing to clean up.");
}
}
Aggregations