本文整理了Java中org.eclipse.osgi.service.resolver.State.getTimeStamp()
方法的一些代码示例,展示了State.getTimeStamp()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。State.getTimeStamp()
方法的具体详情如下:
包路径:org.eclipse.osgi.service.resolver.State
类名称:State
方法名:getTimeStamp
[英]Returns the timestamp for this state. This correlates this timestamp to the system state. For example, if the system state timestamp is 4 but then some bundles are installed, the system state timestamp is updated. By comparing 4 to the current system state timestamp it is possible to detect if the states are out of sync.
[中]返回此状态的时间戳。这会将此时间戳与系统状态关联。例如,如果系统状态时间戳为4,但安装了一些捆绑包,则系统状态时间戳将被更新。通过将4与当前系统状态时间戳进行比较,可以检测状态是否不同步。
代码示例来源:origin: org.eclipse.core/runtime
public long getStateTimeStamp() {
PlatformAdmin admin = getPlatformAdmin();
return admin == null ? -1 : admin.getState(false).getTimeStamp();
}
代码示例来源:origin: org.jibx.config.3rdparty.org.eclipse/org.eclipse.osgi
public long getTimeStamp() {
return target.getTimeStamp();
}
代码示例来源:origin: org.eclipse/org.eclipse.osgi
public long getTimeStamp() {
return target.getTimeStamp();
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.equinox.registry
/**
* Get the time stamp from the PlatformAdmin service.
*/
public static long getContainerTimestamp(BundleContext context, ServiceReference<?> ref) {
if (ref == null)
return -1;
try {
PlatformAdmin admin = (PlatformAdmin) context.getService(ref);
return admin == null ? -1 : admin.getState(false).getTimeStamp();
} finally {
context.ungetService(ref);
}
}
代码示例来源:origin: org.eclipse.equinox/registry
/**
* Get the time stamp from the PlatformAdmin service.
*/
public static long getContainerTimestamp(BundleContext context, ServiceReference ref) {
if (ref == null)
return -1;
try {
PlatformAdmin admin = (PlatformAdmin) context.getService(ref);
return admin == null ? -1 : admin.getState(false).getTimeStamp();
} finally {
context.ungetService(ref);
}
}
代码示例来源:origin: at.bestsolution.efxclipse.eclipse/org.eclipse.equinox.registry
/**
* Get the time stamp from the PlatformAdmin service.
*/
public static long getContainerTimestamp(BundleContext context, ServiceReference ref) {
if (ref == null)
return -1;
try {
PlatformAdmin admin = (PlatformAdmin) context.getService(ref);
return admin == null ? -1 : admin.getState(false).getTimeStamp();
} finally {
context.ungetService(ref);
}
}
代码示例来源:origin: org.eclipse/equinox-registry
/**
* Get the time stamp from the PlatformAdmin service.
*/
public static long getContainerTimestamp(BundleContext context, ServiceReference ref) {
if (ref == null)
return -1;
try {
PlatformAdmin admin = (PlatformAdmin) context.getService(ref);
return admin == null ? -1 : admin.getState(false).getTimeStamp();
} finally {
context.ungetService(ref);
}
}
代码示例来源:origin: org.jibx.config.3rdparty.org.eclipse/org.eclipse.core.runtime
public long getStateTimeStamp() {
PlatformAdmin admin = getPlatformAdmin();
return admin == null ? -1 : admin.getState(false).getTimeStamp();
}
代码示例来源:origin: org.eclipse/core-runtime
public long getStateTimeStamp() {
PlatformAdmin admin = getPlatformAdmin();
return admin == null ? -1 : admin.getState(false).getTimeStamp();
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.core.runtime
public long getStateTimeStamp() {
PlatformAdmin admin = getPlatformAdmin();
return admin == null ? -1 : admin.getState(false).getTimeStamp();
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.update.configurator
/**
* Returns a number that changes whenever the set of installed plug-ins
* changes. This can be used for invalidating caches that are based on
* the set of currently installed plug-ins. (e.g. extensions)
*
* @see PlatformAdmin#getState()
* @see State#getTimeStamp()
*/
public static long getStateStamp() {
ServiceReference<PlatformAdmin> platformAdminReference = getContext().getServiceReference(PlatformAdmin.class);
if (platformAdminReference == null)
return -1;
PlatformAdmin admin = getContext().getService(platformAdminReference);
return admin == null ? -1 : admin.getState(false).getTimeStamp();
}
代码示例来源:origin: com.github.veithen.cosmos.bootstrap/org.eclipse.osgi.compatibility.state
List<ResolverBundle> candidates;
do {
timestamp = state.getTimeStamp();
List<ResolverBundle> hosts = resolverBundles.get(hostConstraint.getVersionConstraint().getName());
candidates = new ArrayList<ResolverBundle>(hosts);
} while (timestamp != state.getTimeStamp());
代码示例来源: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.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
List<ResolverBundle> candidates;
do {
timestamp = state.getTimeStamp();
List<ResolverBundle> hosts = resolverBundles.get(hostConstraint.getVersionConstraint().getName());
candidates = new ArrayList<ResolverBundle>(hosts);
} while (timestamp != state.getTimeStamp());
代码示例来源:origin: org.eclipse.platform/org.eclipse.osgi.compatibility.state
List<ResolverBundle> candidates;
do {
timestamp = state.getTimeStamp();
List<ResolverBundle> hosts = resolverBundles.get(hostConstraint.getVersionConstraint().getName());
candidates = new ArrayList<>(hosts);
} while (timestamp != state.getTimeStamp());
代码示例来源:origin: com.github.veithen.cosmos.bootstrap/org.eclipse.osgi.compatibility.state
public State createState(State original) {
StateImpl newState = internalCreateState();
newState.setTimeStamp(original.getTimeStamp());
BundleDescription[] bundles = original.getBundles();
for (int i = 0; i < bundles.length; i++) {
BundleDescription newBundle = createBundleDescription(bundles[i]);
newState.basicAddBundle(newBundle);
DisabledInfo[] infos = original.getDisabledInfos(bundles[i]);
for (int j = 0; j < infos.length; j++)
newState.addDisabledInfo(new DisabledInfo(infos[j].getPolicyName(), infos[j].getMessage(), newBundle));
}
newState.setResolved(false);
newState.setPlatformProperties(original.getPlatformProperties());
return newState;
}
代码示例来源:origin: org.eclipse/org.eclipse.osgi
public State createState(State original) {
StateImpl newState = internalCreateState();
newState.setTimeStamp(original.getTimeStamp());
BundleDescription[] bundles = original.getBundles();
for (int i = 0; i < bundles.length; i++) {
BundleDescription newBundle = createBundleDescription(bundles[i]);
newState.basicAddBundle(newBundle);
DisabledInfo[] infos = original.getDisabledInfos(bundles[i]);
for (int j = 0; j < infos.length; j++)
newState.addDisabledInfo(new DisabledInfo(infos[j].getPolicyName(), infos[j].getMessage(), newBundle));
}
newState.setResolved(false);
newState.setPlatformProperties(original.getPlatformProperties());
return newState;
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.osgi.compatibility.state
public State createState(State original) {
StateImpl newState = internalCreateState();
newState.setTimeStamp(original.getTimeStamp());
BundleDescription[] bundles = original.getBundles();
for (int i = 0; i < bundles.length; i++) {
BundleDescription newBundle = createBundleDescription(bundles[i]);
newState.basicAddBundle(newBundle);
DisabledInfo[] infos = original.getDisabledInfos(bundles[i]);
for (int j = 0; j < infos.length; j++)
newState.addDisabledInfo(new DisabledInfo(infos[j].getPolicyName(), infos[j].getMessage(), newBundle));
}
newState.setResolved(false);
newState.setPlatformProperties(original.getPlatformProperties());
return newState;
}
代码示例来源:origin: org.jibx.config.3rdparty.org.eclipse/org.eclipse.osgi
public State createState(State original) {
StateImpl newState = internalCreateState();
newState.setTimeStamp(original.getTimeStamp());
BundleDescription[] bundles = original.getBundles();
for (int i = 0; i < bundles.length; i++) {
BundleDescription newBundle = createBundleDescription(bundles[i]);
newState.basicAddBundle(newBundle);
DisabledInfo[] infos = original.getDisabledInfos(bundles[i]);
for (int j = 0; j < infos.length; j++)
newState.addDisabledInfo(new DisabledInfo(infos[j].getPolicyName(), infos[j].getMessage(), newBundle));
}
newState.setResolved(false);
newState.setPlatformProperties(original.getPlatformProperties());
return newState;
}
内容来源于网络,如有侵权,请联系作者删除!