@PreDestroy public void unsubscribe() { eventService.unsubscribe(this, StackPersistedEvent.class); } }
@PreDestroy public void unsubscribe() { eventService.unsubscribe(this, BeforeUserRemovedEvent.class); }
@PreDestroy public void unsubscribe() { eventService.unsubscribe(this, BeforeAccountRemovedEvent.class); }
@PreDestroy public void unsubscribe() { eventService.unsubscribe(this); }
@PreDestroy public void unsubscribe() { eventService.unsubscribe(this, BeforeStackRemovedEvent.class); }
@PreDestroy public void unsubscribe() { eventService.unsubscribe(this, BeforeWorkspaceRemovedEvent.class); }
@PreDestroy public void unsubscribe() { eventService.unsubscribe(this, BeforeUserRemovedEvent.class); }
@PreDestroy private void unsubscribe() { eventService.unsubscribe(this); }
@PreDestroy public void unsubscribe() { eventService.unsubscribe(this, BeforeAccountRemovedEvent.class); }
@PreDestroy public void stopWatcher() { eventService.unsubscribe(eventSubscriber); }
@PreDestroy private void unsubscribe() { eventService.unsubscribe(this); }
@PreDestroy public void unsubscribe() { eventService.unsubscribe(this, BeforeWorkspaceRemovedEvent.class); }
@PreDestroy private void unsubscribe() { eventService.unsubscribe(this); }
@PreDestroy private void unsubscribe() { eventService.unsubscribe(this); }
@PreDestroy public void stopWatchers() { manager.unRegisterByMatcher(indexId); manager.unRegisterByMatcher(origHeadId); eventService.unsubscribe(this); }
bootstrapFuture.complete(null); eventService.unsubscribe(bootstrapperStatusListener, BootstrapperStatusEvent.class); }); bootstrapFuture.whenComplete((ok, ex) -> finishEventFuture.cancel(true));
"Bootstrapping of machine " + machineName + " reached timeout"); } finally { eventService.unsubscribe(bootstrapperStatusListener, BootstrapperStatusEvent.class);
/** * Blocks starting new workspaces and waits until all workspaces that are currently in a * starting/stopping state to finish this process * * @throws InterruptedException * @throws UnsupportedOperationException */ @Override public void suspend() throws InterruptedException, UnsupportedOperationException { try { runtimeInfrastructure.getIdentities(); } catch (UnsupportedOperationException | InfrastructureException e) { throw new UnsupportedOperationException("Current infrastructure does not support suspend."); } Preconditions.checkState(runtimes.refuseStart()); WorkspaceSuspendedEventsPropagator propagator = new WorkspaceSuspendedEventsPropagator(); eventService.subscribe(propagator); try { waitAllWorkspacesRunningOrStopped(); sharedPool.shutdown(); } finally { eventService.unsubscribe(propagator); } try { workspaceRemover.shutdown(); } catch (Exception ignored) { } }
/** * Blocks starting new workspaces and stops all that already running * * @throws InterruptedException */ @Override public void terminate() throws InterruptedException { Preconditions.checkState(runtimes.refuseStart()); WorkspaceStoppedEventsPropagator propagator = new WorkspaceStoppedEventsPropagator(); eventService.subscribe(propagator); try { stopRunningAndStartingWorkspacesAsync(); waitAllWorkspacesStopped(); sharedPool.shutdown(); } finally { eventService.unsubscribe(propagator); } try { workspaceRemover.shutdown(); } catch (Exception ignored) { } }