Toggle navigation
Home
org.eclipse.che.api.workspace.server.spi.InternalRuntime to org.eclipse.che.api.workspace.server.WorkspaceRuntimes.RuntimeState
No. of Instances - 3
No. of Commits - 1
No. of Projects - {'che'}
Hierarchy/Composition: Composition
Primitive Info: -
NameSpace: Internal -> Internal
Mapping:
Add or Remove Method invocation
format("Error occurs on workspace '%s' start. Error: %s",workspaceId,e)
to
STOPPED
DtoFactory.newDto(WorkspaceStatusEvent.class).withWorkspaceId(workspaceId).withStatus(WorkspaceStatus.STOPPED).withPrevStatus(WorkspaceStatus.STARTING).withError(e.getMessage())
to
STARTING
ThreadLocalPropagateContext.wrap(() -> { try { runtime.start(options); eventService.publish(DtoFactory.newDto(WorkspaceStatusEvent.class).withWorkspaceId(workspaceId).withStatus(WorkspaceStatus.RUNNING).withPrevStatus(WorkspaceStatus.STARTING)); } catch ( InfrastructureException e) { runtimes.remove(workspaceId); eventService.publish(STARTING); if (e instanceof InternalInfrastructureException) { LOG.error(STOPPED); } throw new RuntimeException(e); } } )
to
ThreadLocalPropagateContext.wrap(() -> { try { runtime.start(options); runtimes.replace(workspaceId,new RuntimeState(runtime,RUNNING)); eventService.publish(DtoFactory.newDto(WorkspaceStatusEvent.class).withWorkspaceId(workspaceId).withStatus(WorkspaceStatus.RUNNING).withPrevStatus(STARTING)); } catch ( InfrastructureException e) { runtimes.remove(workspaceId); eventService.publish(DtoFactory.newDto(WorkspaceStatusEvent.class).withWorkspaceId(workspaceId).withStatus(STOPPED).withPrevStatus(STARTING).withError(e.getMessage())); throw new RuntimeException(e); } } )
Rename Variable
runtime
to
state