@Override public void close(Throwable error) { if (contextObject != null) { contextFactory.destroyFn().accept(contextObject); } }
@Override public void close() { // close() might be called even if init() was not called. // Only destroy the context if is not shared (i.e. it is our own). if (contextObject != null && !contextFactory.isSharedLocally()) { contextFactory.destroyFn().accept(contextObject); } contextObject = null; }
@Override public void close() { // close() might be called even if init() was not called. // Only destroy the context if is not shared (i.e. it is our own). if (contextObject != null && !contextFactory.isSharedLocally()) { contextFactory.destroyFn().accept(contextObject); } contextObject = null; }
@Override public void close() { // close() might be called even if init() was not called. // Only destroy the context if is not shared (i.e. it is our own). if (contextObject != null && !contextFactory.isSharedLocally()) { contextFactory.destroyFn().accept(contextObject); } contextObject = null; }