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

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

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

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

InternalRuntime<?> runtime = null;
try {
 runtime = getInternalRuntime(workspaceId);
origin: org.eclipse.che.core/che-core-api-workspace

/**
 * Injects runtime information such as status and {@link
 * org.eclipse.che.api.core.model.workspace.Runtime} into the workspace object, if the workspace
 * doesn't have runtime sets the status to {@link WorkspaceStatus#STOPPED}.
 *
 * @param workspace the workspace to inject runtime into
 */
public void injectRuntime(WorkspaceImpl workspace) throws ServerException {
 try (Unlocker ignored = lockService.writeLock(workspace.getId())) {
  WorkspaceStatus workspaceStatus = statuses.get(workspace.getId());
  if (workspaceStatus == null) {
   workspace.setStatus(STOPPED);
   return;
  }
  InternalRuntime<?> internalRuntime;
  try {
   internalRuntime = getInternalRuntime(workspace.getId());
  } catch (ServerException | InfrastructureException e) {
   workspace.setStatus(STOPPED);
   return;
  }
  workspace.setRuntime(asRuntime(internalRuntime));
  workspace.setStatus(workspaceStatus);
 }
}
org.eclipse.che.api.workspace.serverWorkspaceRuntimesgetInternalRuntime

Javadoc

Returns InternalRuntime implementation for workspace with the specified id.

If memory-storage does not contain internal runtime, then runtime will be recovered if it is active. Otherwise, an exception will be thrown.

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
  • 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
  • isAnyInProgress
    Returns true if there is at least one local workspace starting or stopping (it's status is Workspace
  • isAnyActive,
  • isAnyInProgress,
  • publishWorkspaceStatusEvent,
  • recover,
  • recoverOne,
  • refuseStart,
  • sessionUserNameOr,
  • setRuntimesId,
  • startAsync

Popular in Java

  • Making http post requests using okhttp
  • notifyDataSetChanged (ArrayAdapter)
  • scheduleAtFixedRate (Timer)
  • setRequestProperty (URLConnection)
  • Font (java.awt)
    The Font class represents fonts, which are used to render text in a visible way. A font provides the
  • OutputStream (java.io)
    A writable sink for bytes.Most clients will use output streams that write data to the file system (
  • HttpURLConnection (java.net)
    An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement. A servlet is a small Java program that runs within
  • JFrame (javax.swing)
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
  • Best plugins for Eclipse
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