congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
WorkspaceRuntimes.refuseStart
Code IndexAdd Tabnine to your IDE (free)

How to use
refuseStart
method
in
org.eclipse.che.api.workspace.server.WorkspaceRuntimes

Best Java code snippets using org.eclipse.che.api.workspace.server.WorkspaceRuntimes.refuseStart (Showing top 2 results out of 315)

origin: org.eclipse.che.core/che-core-api-workspace

/**
 * 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) {
 }
}
origin: org.eclipse.che.core/che-core-api-workspace

/**
 * 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) {
 }
}
org.eclipse.che.api.workspace.serverWorkspaceRuntimesrefuseStart

Javadoc

Once called no more workspaces are allowed to start, #startAsync will always throw an appropriate exception. All the running workspaces will continue running, unless stopped directly.

Popular methods of WorkspaceRuntimes

  • getRuntimeContext
    Returns an optional wrapping the runtime context of the workspace with the given identifier, an empt
  • asRuntime
  • copyEnv
  • createInternalEnvironment
  • getActive
    Gets the workspaces identifiers managed by this component. If an identifier is present in set then t
  • getInProgress
    Gets the list of workspace id's which are currently starting or stopping on given node. (it's status
  • getInternalRuntime
    Returns InternalRuntime implementation for workspace with the specified id.If memory-storage does no
  • getStatus
    Gets workspace status by its identifier.
  • getSupportedRecipes
  • hasRuntime
    Returns true if workspace was started and its status is WorkspaceStatus#RUNNING, WorkspaceStatus#STA
  • injectRuntime
    Injects runtime information such as status and org.eclipse.che.api.core.model.workspace.Runtime into
  • isAnyActive
    Returns true if there is at least one workspace active(it's status is different from WorkspaceStatus
  • injectRuntime,
  • isAnyActive,
  • isAnyInProgress,
  • publishWorkspaceStatusEvent,
  • recover,
  • recoverOne,
  • sessionUserNameOr,
  • setRuntimesId,
  • startAsync

Popular in Java

  • Start an intent from android
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • setRequestProperty (URLConnection)
  • getSharedPreferences (Context)
  • GridBagLayout (java.awt)
    The GridBagLayout class is a flexible layout manager that aligns components vertically and horizonta
  • ResourceBundle (java.util)
    ResourceBundle is an abstract class which is the superclass of classes which provide Locale-specifi
  • ExecutorService (java.util.concurrent)
    An Executor that provides methods to manage termination and methods that can produce a Future for tr
  • ThreadPoolExecutor (java.util.concurrent)
    An ExecutorService that executes each submitted task using one of possibly several pooled threads, n
  • ReentrantLock (java.util.concurrent.locks)
    A reentrant mutual exclusion Lock with the same basic behavior and semantics as the implicit monitor
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
  • Top Sublime Text plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now