public long getStateTimeStamp() { PlatformAdmin admin = getPlatformAdmin(); return admin == null ? -1 : admin.getState(false).getTimeStamp(); }
public long getTimeStamp() { return target.getTimeStamp(); }
public long getTimeStamp() { return target.getTimeStamp(); }
/** * 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); } }
/** * 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); } }
/** * 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); } }
/** * 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); } }
public long getStateTimeStamp() { PlatformAdmin admin = getPlatformAdmin(); return admin == null ? -1 : admin.getState(false).getTimeStamp(); }
public long getStateTimeStamp() { PlatformAdmin admin = getPlatformAdmin(); return admin == null ? -1 : admin.getState(false).getTimeStamp(); }
public long getStateTimeStamp() { PlatformAdmin admin = getPlatformAdmin(); return admin == null ? -1 : admin.getState(false).getTimeStamp(); }
/** * 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(); }
List<ResolverBundle> candidates; do { timestamp = state.getTimeStamp(); List<ResolverBundle> hosts = resolverBundles.get(hostConstraint.getVersionConstraint().getName()); candidates = new ArrayList<ResolverBundle>(hosts); } while (timestamp != state.getTimeStamp());
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) {
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) {
List<ResolverBundle> candidates; do { timestamp = state.getTimeStamp(); List<ResolverBundle> hosts = resolverBundles.get(hostConstraint.getVersionConstraint().getName()); candidates = new ArrayList<ResolverBundle>(hosts); } while (timestamp != state.getTimeStamp());
List<ResolverBundle> candidates; do { timestamp = state.getTimeStamp(); List<ResolverBundle> hosts = resolverBundles.get(hostConstraint.getVersionConstraint().getName()); candidates = new ArrayList<>(hosts); } while (timestamp != state.getTimeStamp());
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; }
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; }
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; }
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; }