Skip to content

Instantly share code, notes, and snippets.

@felixklauke
Created September 7, 2018 09:41
Show Gist options
  • Save felixklauke/30db9ae208f3f85bff6b4540615b95de to your computer and use it in GitHub Desktop.
Save felixklauke/30db9ae208f3f85bff6b4540615b95de to your computer and use it in GitHub Desktop.
@Override
public synchronized void close()
{
if ( state.compareAndSet(State.STARTING, State.CLOSED) || state.compareAndSet(State.STARTED, State.CLOSED) )
{
try
{
if (newLifecycleManager != null) {
newLifecycleManager.notifyShutdown();
}
preDestroyMonitor.close();
}
catch ( Exception e )
{
log.error("While stopping instances", e);
}
finally
{
objectStates.clear();
preDestroyActionCache.clear();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment