use of org.eclipse.che.workspace.infrastructure.kubernetes.model.KubernetesServerImpl.ServerId in project che-server by eclipse-che.
the class JpaKubernetesMachineCache method getServer.
@Transactional(rollbackOn = InfrastructureException.class)
@Override
public KubernetesServerImpl getServer(RuntimeIdentity runtimeIdentity, String machineName, String serverName) throws InfrastructureException {
try {
String workspaceId = runtimeIdentity.getWorkspaceId();
KubernetesServerImpl server = managerProvider.get().find(KubernetesServerImpl.class, new ServerId(workspaceId, machineName, serverName));
if (server == null) {
throw new InfrastructureException(format("Server with name '%s' was not found", serverName));
}
return server;
} catch (RuntimeException e) {
throw new InfrastructureException(e.getMessage(), e);
}
}
use of org.eclipse.che.workspace.infrastructure.kubernetes.model.KubernetesServerImpl.ServerId in project devspaces-images by redhat-developer.
the class JpaKubernetesMachineCache method getServer.
@Transactional(rollbackOn = InfrastructureException.class)
@Override
public KubernetesServerImpl getServer(RuntimeIdentity runtimeIdentity, String machineName, String serverName) throws InfrastructureException {
try {
String workspaceId = runtimeIdentity.getWorkspaceId();
KubernetesServerImpl server = managerProvider.get().find(KubernetesServerImpl.class, new ServerId(workspaceId, machineName, serverName));
if (server == null) {
throw new InfrastructureException(format("Server with name '%s' was not found", serverName));
}
return server;
} catch (RuntimeException e) {
throw new InfrastructureException(e.getMessage(), e);
}
}
Aggregations