本文整理汇总了Java中org.eclipse.che.api.workspace.server.WorkspaceManager类的典型用法代码示例。如果您正苦于以下问题:Java WorkspaceManager类的具体用法?Java WorkspaceManager怎么用?Java WorkspaceManager使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
WorkspaceManager类属于org.eclipse.che.api.workspace.server包,在下文中一共展示了WorkspaceManager类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: WorkspaceFsBackupScheduler
import org.eclipse.che.api.workspace.server.WorkspaceManager; //导入依赖的package包/类
@Inject
public WorkspaceFsBackupScheduler(
Map<String, EnvironmentBackupManager> backupManagers,
WorkspaceRuntimes workspaceRuntimes,
@Named("machine.backup.backup_period_second") long syncTimeoutSecond,
WorkspaceManager workspaceManager) {
this.workspaceRuntimes = workspaceRuntimes;
this.backupManagers = backupManagers;
this.syncTimeoutMillisecond = TimeUnit.SECONDS.toMillis(syncTimeoutSecond);
this.workspaceManager = workspaceManager;
this.executor =
Executors.newCachedThreadPool(
new ThreadFactoryBuilder()
.setNameFormat("WorkspaceFsBackupScheduler-%s")
.setUncaughtExceptionHandler(LoggingUncaughtExceptionHandler.getInstance())
.build());
this.lastWorkspaceSynchronizationTime = new ConcurrentHashMap<>();
this.workspacesBackupsInProgress = new ConcurrentHashMap<>();
}
示例2: DockerEnvironmentBackupManager
import org.eclipse.che.api.workspace.server.WorkspaceManager; //导入依赖的package包/类
@Inject
public DockerEnvironmentBackupManager(
@Named("machine.backup.backup_script") String backupScript,
@Named("machine.backup.restore_script") String restoreScript,
@Named("machine.backup.backup_duration_second") int maxBackupDurationSec,
@Named("machine.backup.restore_duration_second") int restoreDurationSec,
@Named("che.user.workspaces.storage") File backupsRootDir,
WorkspaceIdHashLocationFinder workspaceIdHashLocationFinder,
@Named("che.workspace.projects.storage") String projectFolderPath,
WorkspaceManager workspaceManager,
DockerConnector dockerConnector) {
this.backupScript = backupScript;
this.restoreScript = restoreScript;
this.maxBackupDuration = maxBackupDurationSec;
this.restoreDuration = restoreDurationSec;
this.backupsRootDir = backupsRootDir;
this.workspaceIdHashLocationFinder = workspaceIdHashLocationFinder;
this.projectFolderPath = projectFolderPath;
this.workspaceManager = workspaceManager;
this.dockerConnector = dockerConnector;
workspacesBackupLocks = new ConcurrentHashMap<>();
workspacesMachinesUsersInfo = new ConcurrentHashMap<>();
}
示例3: FactoryService
import org.eclipse.che.api.workspace.server.WorkspaceManager; //导入依赖的package包/类
@Inject
public FactoryService(
FactoryManager factoryManager,
UserManager userManager,
PreferenceManager preferenceManager,
FactoryCreateValidator createValidator,
FactoryAcceptValidator acceptValidator,
FactoryEditValidator editValidator,
FactoryBuilder factoryBuilder,
WorkspaceManager workspaceManager,
FactoryParametersResolverHolder factoryParametersResolverHolder) {
this.factoryManager = factoryManager;
this.userManager = userManager;
this.createValidator = createValidator;
this.preferenceManager = preferenceManager;
this.acceptValidator = acceptValidator;
this.editValidator = editValidator;
this.factoryBuilder = factoryBuilder;
this.workspaceManager = workspaceManager;
this.factoryParametersResolvers =
factoryParametersResolverHolder.getFactoryParametersResolvers();
}
示例4: AuditManager
import org.eclipse.che.api.workspace.server.WorkspaceManager; //导入依赖的package包/类
@Inject
public AuditManager(
UserManager userManager,
WorkspaceManager workspaceManager,
PermissionsManager permissionsManager) {
this.userManager = userManager;
this.workspaceManager = workspaceManager;
this.permissionsManager = permissionsManager;
}
示例5: HostedWorkspaceActivityManager
import org.eclipse.che.api.workspace.server.WorkspaceManager; //导入依赖的package包/类
@Inject
public HostedWorkspaceActivityManager(
ResourceUsageManager resourceUsageManager,
AccountManager accountManager,
WorkspaceManager workspaceManager,
EventService eventService) {
super(workspaceManager, eventService, -1);
this.resourceUsageManager = resourceUsageManager;
this.accountManager = accountManager;
}
示例6: WorkspacePermissionsFilter
import org.eclipse.che.api.workspace.server.WorkspaceManager; //导入依赖的package包/类
@Inject
public WorkspacePermissionsFilter(
WorkspaceManager workspaceManager,
AccountManager accountManager,
Set<AccountPermissionsChecker> accountPermissionsCheckers,
SuperPrivilegesChecker superPrivilegesChecker) {
this.workspaceManager = workspaceManager;
this.accountManager = accountManager;
this.accountTypeToPermissionsChecker =
accountPermissionsCheckers
.stream()
.collect(toMap(AccountPermissionsChecker::getAccountType, identity()));
this.superPrivilegesChecker = superPrivilegesChecker;
}
示例7: configure
import org.eclipse.che.api.workspace.server.WorkspaceManager; //导入依赖的package包/类
@Override
protected void configure() {
bind(ResourceUsageService.class);
bind(AccountLicenseService.class);
bind(LicenseServicePermissionsFilter.class);
bind(FreeResourcesLimitService.class);
bind(FreeResourcesLimitDao.class).to(JpaFreeResourcesLimitDao.class);
bind(JpaFreeResourcesLimitDao.RemoveFreeResourcesLimitSubscriber.class).asEagerSingleton();
bind(WorkspaceManager.class).to(LimitsCheckingWorkspaceManager.class);
MapBinder.newMapBinder(binder(), String.class, AvailableResourcesProvider.class);
Multibinder.newSetBinder(binder(), DefaultResourcesProvider.class);
Multibinder.newSetBinder(binder(), ResourceLockKeyProvider.class);
Multibinder.newSetBinder(binder(), AccountPermissionsChecker.class);
Multibinder.newSetBinder(binder(), ResourcesProvider.class)
.addBinding()
.to(FreeResourcesProvider.class);
MapBinder.newMapBinder(binder(), String.class, AvailableResourcesProvider.class);
Multibinder<ResourceType> resourcesTypesBinder =
Multibinder.newSetBinder(binder(), ResourceType.class);
resourcesTypesBinder.addBinding().to(RamResourceType.class);
resourcesTypesBinder.addBinding().to(WorkspaceResourceType.class);
resourcesTypesBinder.addBinding().to(RuntimeResourceType.class);
resourcesTypesBinder.addBinding().to(TimeoutResourceType.class);
Multibinder<ResourceUsageTracker> usageTrackersBinder =
Multibinder.newSetBinder(binder(), ResourceUsageTracker.class);
usageTrackersBinder.addBinding().to(RamResourceUsageTracker.class);
usageTrackersBinder.addBinding().to(WorkspaceResourceUsageTracker.class);
usageTrackersBinder.addBinding().to(RuntimeResourceUsageTracker.class);
}
示例8: RamResourceUsageTracker
import org.eclipse.che.api.workspace.server.WorkspaceManager; //导入依赖的package包/类
@Inject
public RamResourceUsageTracker(
Provider<WorkspaceManager> workspaceManagerProvider,
AccountManager accountManager,
EnvironmentRamCalculator environmentRamCalculator) {
this.workspaceManagerProvider = workspaceManagerProvider;
this.accountManager = accountManager;
this.environmentRamCalculator = environmentRamCalculator;
}
示例9: DockerAbandonedResourcesCleaner
import org.eclipse.che.api.workspace.server.WorkspaceManager; //导入依赖的package包/类
@Inject
public DockerAbandonedResourcesCleaner(
WorkspaceManager workspaceManager,
DockerConnector dockerConnector,
ContainerNameGenerator nameGenerator,
WorkspaceRuntimes workspaceRuntimes) {
this.workspaceManager = workspaceManager;
this.dockerConnector = dockerConnector;
this.nameGenerator = nameGenerator;
this.runtimes = workspaceRuntimes;
}
示例10: WorkspaceStatusSubscriber
import org.eclipse.che.api.workspace.server.WorkspaceManager; //导入依赖的package包/类
@Inject
public WorkspaceStatusSubscriber(
EventService eventService,
SshManager sshManager,
WorkspaceManager workspaceManager,
ExecAgentClientFactory execAgentClientFactory) {
this.eventService = eventService;
this.keysInjector = new KeysInjector(sshManager, workspaceManager, execAgentClientFactory);
}
示例11: KeysInjector
import org.eclipse.che.api.workspace.server.WorkspaceManager; //导入依赖的package包/类
public KeysInjector(
SshManager sshManager,
WorkspaceManager workspaceManager,
ExecAgentClientFactory execAgentClientFactory) {
this.sshManager = sshManager;
this.workspaceManager = workspaceManager;
this.execAgentClientFactory = execAgentClientFactory;
}
示例12: WorkspaceResourceUsageTracker
import org.eclipse.che.api.workspace.server.WorkspaceManager; //导入依赖的package包/类
@Inject
public WorkspaceResourceUsageTracker(
Provider<WorkspaceManager> workspaceManagerProvider, AccountManager accountManager) {
this.workspaceManagerProvider = workspaceManagerProvider;
this.accountManager = accountManager;
}
示例13: RuntimeResourceUsageTracker
import org.eclipse.che.api.workspace.server.WorkspaceManager; //导入依赖的package包/类
@Inject
public RuntimeResourceUsageTracker(
Provider<WorkspaceManager> workspaceManagerProvider, AccountManager accountManager) {
this.workspaceManagerProvider = workspaceManagerProvider;
this.accountManager = accountManager;
}
示例14: WorkspaceActivityManager
import org.eclipse.che.api.workspace.server.WorkspaceManager; //导入依赖的package包/类
@Inject
public WorkspaceActivityManager(
WorkspaceManager workspaceManager,
EventService eventService,
@Named("che.workspace.agent.dev.inactive_stop_timeout_ms") long timeout) {
this.timeout = timeout;
this.workspaceManager = workspaceManager;
this.eventService = eventService;
this.activeWorkspaces = new ConcurrentHashMap<>();
this.workspaceEventsSubscriber =
new EventSubscriber<WorkspaceStatusEvent>() {
@Override
public void onEvent(WorkspaceStatusEvent event) {
switch (event.getStatus()) {
case RUNNING:
try {
Workspace workspace = workspaceManager.getWorkspace(event.getWorkspaceId());
if (workspace.getAttributes().remove(WORKSPACE_STOPPED_BY) != null) {
workspaceManager.updateWorkspace(event.getWorkspaceId(), workspace);
}
} catch (Exception ex) {
LOG.warn(
"Failed to remove stopped information attribute for workspace "
+ event.getWorkspaceId());
}
update(event.getWorkspaceId(), System.currentTimeMillis());
break;
case STOPPED:
activeWorkspaces.remove(event.getWorkspaceId());
break;
default:
// do nothing
}
}
};
}
示例15: WorkspaceActivityService
import org.eclipse.che.api.workspace.server.WorkspaceManager; //导入依赖的package包/类
@Inject
public WorkspaceActivityService(
WorkspaceActivityManager workspaceActivityManager, WorkspaceManager wsManager) {
this.workspaceActivityManager = workspaceActivityManager;
this.workspaceManager = wsManager;
}