/** * Tick down the count, triggering a deployment status report when the count is zero. */ private void tick() { int tick = busyServiceCount.decrementAndGet(); synchronized (this) { notifyAll(); if (tick == 0) { ContainerStateChangeReport changeReport = createContainerStateChangeReport(true); if (changeReport != null) { final String msg = createChangeReportLogMessage(changeReport); ROOT_LOGGER.info(msg); } } } }
/** * Log a report of any problematic container state changes and reset container state change history * so another run of this method or of {@link #awaitContainerStateChangeReport(long, java.util.concurrent.TimeUnit)} * will produce a report not including any changes included in a report returned by this run. */ void logContainerStateChangesAndReset() { ContainerStateChangeReport changeReport = createContainerStateChangeReport(true); if (changeReport != null) { final String msg = createChangeReportLogMessage(changeReport, false); ROOT_LOGGER.info(msg); } }
void release() { ContainerStateChangeReport changeReport = createContainerStateChangeReport(true); if (changeReport != null) { final String msg = createChangeReportLogMessage(changeReport); ROOT_LOGGER.info(msg); } }
/** * Log a report of any problematic container state changes and reset container state change history * so another run of this method or of {@link #awaitContainerStateChangeReport(long, java.util.concurrent.TimeUnit)} * will produce a report not including any changes included in a report returned by this run. */ void logContainerStateChangesAndReset() { ContainerStateChangeReport changeReport = createContainerStateChangeReport(true); if (changeReport != null) { final String msg = createChangeReportLogMessage(changeReport, false); ROOT_LOGGER.info(msg); } }
@Override public void execute(OperationContext context, ModelNode operation) throws OperationFailedException { // We only need to report if our response has no failure description already // and if no other verification handler has reported a failure (which they may have done // against a different response object that is invisible to us at this point, // hence the use of the FAILURE_REPORTED_ATTACHMENT) if (!context.hasFailureDescription() && context.getAttachment(FAILURE_REPORTED_ATTACHMENT) == null) { throw new OperationFailedException(ContainerStateMonitor.createChangeReportLogMessage(changeReport, true)); } } }
@Override public void execute(OperationContext context, ModelNode operation) throws OperationFailedException { // We only need to report if our response has no failure description already // and if no other verification handler has reported a failure (which they may have done // against a different response object that is invisible to us at this point, // hence the use of the FAILURE_REPORTED_ATTACHMENT) if (!context.hasFailureDescription() && context.getAttachment(FAILURE_REPORTED_ATTACHMENT) == null) { throw new OperationFailedException(ContainerStateMonitor.createChangeReportLogMessage(changeReport, true)); } } }