org.eclipse.osgi.service.resolver.State.setTimeStamp()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(6.2k)|赞(0)|评价(0)|浏览(109)

本文整理了Java中org.eclipse.osgi.service.resolver.State.setTimeStamp()方法的一些代码示例,展示了State.setTimeStamp()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。State.setTimeStamp()方法的具体详情如下:
包路径:org.eclipse.osgi.service.resolver.State
类名称:State
方法名:setTimeStamp

State.setTimeStamp介绍

[英]Sets the timestamp for this state
[中]设置此状态的时间戳

代码示例

代码示例来源:origin: com.github.veithen.cosmos.bootstrap/org.eclipse.osgi.compatibility.state

if (revision != null) {
  systemState.addBundle(converter.createDescription(revision));
  systemState.setTimeStamp(database.getRevisionsTimestamp());
systemState.setTimeStamp(database.getRevisionsTimestamp());
break;
if (revision != null) {
  systemState.updateBundle(converter.createDescription(revision));
  systemState.setTimeStamp(database.getRevisionsTimestamp());

代码示例来源:origin: org.eclipse.platform/org.eclipse.osgi.compatibility.state

if (revision != null) {
  systemState.addBundle(converter.createDescription(revision));
  systemState.setTimeStamp(database.getRevisionsTimestamp());
systemState.setTimeStamp(database.getRevisionsTimestamp());
break;
if (revision != null) {
  systemState.updateBundle(converter.createDescription(revision));
  systemState.setTimeStamp(database.getRevisionsTimestamp());

代码示例来源:origin: org.eclipse.platform/org.eclipse.osgi.compatibility.state

private void resolve(boolean uninstalled) {
  database.readLock();
  try {
    if (lastResolveStamp != database.getRevisionsTimestamp()) {
      Collection<ModuleRevision> containerRemovalPending = container.getRemovalPending();
      BundleDescription[] stateRemovalPendingDescs = systemState.getRemovalPending();
      Collection<BundleDescription> stateRemovalPending = new ArrayList<>(stateRemovalPendingDescs.length);
      for (BundleDescription description : stateRemovalPendingDescs) {
        if (!containerRemovalPending.contains(description.getUserObject())) {
          stateRemovalPending.add(description);
        }
      }
      if (!stateRemovalPending.isEmpty()) {
        systemState.resolve(stateRemovalPending.toArray(new BundleDescription[stateRemovalPending.size()]), true);
      } else {
        systemState.resolve(!uninstalled);
      }
      lastResolveStamp = database.getRevisionsTimestamp();
      systemState.setTimeStamp(database.getRevisionsTimestamp());
    }
  } finally {
    database.readUnlock();
  }
}

代码示例来源:origin: com.github.veithen.cosmos.bootstrap/org.eclipse.osgi.compatibility.state

private void resolve(boolean uninstalled) {
  database.readLock();
  try {
    if (lastResolveStamp != database.getRevisionsTimestamp()) {
      Collection<ModuleRevision> containerRemovalPending = container.getRemovalPending();
      BundleDescription[] stateRemovalPendingDescs = systemState.getRemovalPending();
      Collection<BundleDescription> stateRemovalPending = new ArrayList<BundleDescription>(stateRemovalPendingDescs.length);
      for (BundleDescription description : stateRemovalPendingDescs) {
        if (!containerRemovalPending.contains(description.getUserObject())) {
          stateRemovalPending.add(description);
        }
      }
      if (!stateRemovalPending.isEmpty()) {
        systemState.resolve(stateRemovalPending.toArray(new BundleDescription[stateRemovalPending.size()]), true);
      } else {
        systemState.resolve(!uninstalled);
      }
      lastResolveStamp = database.getRevisionsTimestamp();
      systemState.setTimeStamp(database.getRevisionsTimestamp());
    }
  } finally {
    database.readUnlock();
  }
}

代码示例来源:origin: org.jibx.config.3rdparty.org.eclipse/org.eclipse.osgi

if (shutdown && "true".equals(FrameworkProperties.getProperty("osgi.forcedRestart"))) //$NON-NLS-1$ //$NON-NLS-2$
  systemState.setTimeStamp(systemState.getTimeStamp() + 1);
BundleDescription[] removalPendings = systemState.getRemovalPending();
if (removalPendings.length > 0) {

代码示例来源:origin: org.eclipse/org.eclipse.osgi

if (shutdown && "true".equals(FrameworkProperties.getProperty("osgi.forcedRestart"))) //$NON-NLS-1$ //$NON-NLS-2$
  systemState.setTimeStamp(systemState.getTimeStamp() + 1);
BundleDescription[] removalPendings = systemState.getRemovalPending();
if (removalPendings.length > 0) {

代码示例来源:origin: org.eclipse.platform/org.eclipse.osgi.compatibility.state

private State createSystemState() {
  State state = factory.createState(true);
  StateConverter converter = new StateConverter(state);
  ModuleDatabase database = equinoxContainer.getStorage().getModuleDatabase();
  database.readLock();
  try {
    ModuleContainer container = equinoxContainer.getStorage().getModuleContainer();
    List<Module> modules = equinoxContainer.getStorage().getModuleContainer().getModules();
    for (Module module : modules) {
      ModuleRevision current = module.getCurrentRevision();
      BundleDescription description = converter.createDescription(current);
      state.addBundle(description);
    }
    state.setPlatformProperties(asDictionary(equinoxContainer.getConfiguration().getInitialConfig()));
    synchronizer = new PlatformBundleListener(state, converter, database, container);
    state.setResolverHookFactory(synchronizer);
    bc.addBundleListener(synchronizer);
    bc.addFrameworkListener(synchronizer);
    state.resolve();
    state.setTimeStamp(database.getRevisionsTimestamp());
  } finally {
    database.readUnlock();
  }
  return state;
}

代码示例来源:origin: com.github.veithen.cosmos.bootstrap/org.eclipse.osgi.compatibility.state

private State createSystemState() {
  State state = factory.createState(true);
  StateConverter converter = new StateConverter(state);
  ModuleDatabase database = equinoxContainer.getStorage().getModuleDatabase();
  database.readLock();
  try {
    ModuleContainer container = equinoxContainer.getStorage().getModuleContainer();
    List<Module> modules = equinoxContainer.getStorage().getModuleContainer().getModules();
    for (Module module : modules) {
      ModuleRevision current = module.getCurrentRevision();
      BundleDescription description = converter.createDescription(current);
      state.addBundle(description);
    }
    state.setPlatformProperties(asDictionary(equinoxContainer.getConfiguration().getInitialConfig()));
    synchronizer = new PlatformBundleListener(state, converter, database, container);
    state.setResolverHookFactory(synchronizer);
    bc.addBundleListener(synchronizer);
    bc.addFrameworkListener(synchronizer);
    state.resolve();
    state.setTimeStamp(database.getRevisionsTimestamp());
  } finally {
    database.readUnlock();
  }
  return state;
}

代码示例来源:origin: org.jibx.config.3rdparty.org.eclipse/org.eclipse.osgi

systemState.setTimeStamp(systemState.getTimeStamp() == Long.MAX_VALUE ? 0 : systemState.getTimeStamp() + 1);

代码示例来源:origin: org.eclipse/org.eclipse.osgi

systemState.setTimeStamp(systemState.getTimeStamp() == Long.MAX_VALUE ? 0 : systemState.getTimeStamp() + 1);

相关文章

微信公众号

最新文章

更多