当前位置: 首页>>代码示例>>Java>>正文


Java WorkspaceManager类代码示例

本文整理汇总了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<>();
}
 
开发者ID:codenvy,项目名称:codenvy,代码行数:21,代码来源:WorkspaceFsBackupScheduler.java

示例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<>();
}
 
开发者ID:codenvy,项目名称:codenvy,代码行数:25,代码来源:DockerEnvironmentBackupManager.java

示例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();
}
 
开发者ID:eclipse,项目名称:che,代码行数:23,代码来源:FactoryService.java

示例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;
}
 
开发者ID:codenvy,项目名称:codenvy,代码行数:10,代码来源:AuditManager.java

示例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;
}
 
开发者ID:codenvy,项目名称:codenvy,代码行数:12,代码来源:HostedWorkspaceActivityManager.java

示例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;
}
 
开发者ID:eclipse,项目名称:che,代码行数:15,代码来源:WorkspacePermissionsFilter.java

示例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);
}
 
开发者ID:eclipse,项目名称:che,代码行数:38,代码来源:ResourceModule.java

示例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;
}
 
开发者ID:eclipse,项目名称:che,代码行数:10,代码来源:RamResourceUsageTracker.java

示例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;
}
 
开发者ID:eclipse,项目名称:che,代码行数:12,代码来源:DockerAbandonedResourcesCleaner.java

示例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);
}
 
开发者ID:eclipse,项目名称:che,代码行数:10,代码来源:WorkspaceStatusSubscriber.java

示例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;
}
 
开发者ID:eclipse,项目名称:che,代码行数:9,代码来源:KeysInjector.java

示例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;
}
 
开发者ID:eclipse,项目名称:che,代码行数:7,代码来源:WorkspaceResourceUsageTracker.java

示例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;
}
 
开发者ID:eclipse,项目名称:che,代码行数:7,代码来源:RuntimeResourceUsageTracker.java

示例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
          }
        }
      };
}
 
开发者ID:eclipse,项目名称:che,代码行数:37,代码来源:WorkspaceActivityManager.java

示例15: WorkspaceActivityService

import org.eclipse.che.api.workspace.server.WorkspaceManager; //导入依赖的package包/类
@Inject
public WorkspaceActivityService(
    WorkspaceActivityManager workspaceActivityManager, WorkspaceManager wsManager) {
  this.workspaceActivityManager = workspaceActivityManager;
  this.workspaceManager = wsManager;
}
 
开发者ID:eclipse,项目名称:che,代码行数:7,代码来源:WorkspaceActivityService.java


注:本文中的org.eclipse.che.api.workspace.server.WorkspaceManager类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。