PropertySet getDatabasePropertySet() { return databasePropertySet.get(); } }
@Override public long getValue() { final Long value = supplier.get(); return (value != null) ? value : 0L; } }
@Override protected T create() throws Exception { try { return supplier.get(); } finally { supplier = null; // not needed any more } } }
@Override public ConnectModuleProvider getModule() { return moduleLazyReference.get(); } }
@Override public T get() { return delegate.get(); } }
public R get(final D input) { return supplier.get(); } };
@Override public ConnectPluginModuleDeserializer<?, ?> getModule() { return moduleLazyReference.get(); }
@Override public ConnectModuleProvider<? extends ModuleBean> getModule() { return moduleLazyReference.get(); }
@Override public void setTimeZone(final TimeZone zone) { delegate.get().setTimeZone(zone); } }
@VisibleForTesting OfBizPropertyEntryStore getEntryStore() { return entryStoreRef.get(); }
@Override public StringBuffer format(final Date date, final StringBuffer toAppendTo, final FieldPosition fieldPosition) { return delegate.get().format(date, toAppendTo, fieldPosition); }
@Override public Date parse(final String source, final ParsePosition pos) { return delegate.get().parse(source, pos); }
@Override public Date parse(final String source) throws ParseException { return delegate.get().parse(source); }
@Override public void setLenient(final boolean lenient) { delegate.get().setLenient(lenient); }
private boolean matches(@Nonnull Supplier<?> supplier) { // Note: It is *not* okay for the supplier to return null! final Object value = supplier.get(); return value instanceof Long && ((Long)value) == expectedValue; }
public void switchToDatabaseMode() { active.compareAndSet(memoryPropertySet, databasePropertySet.get()); }
TimeToIdle(final Supplier<Timeout> timeout) { this.timeout = checkNotNull(timeout); lastAccess = timeout.get(); }
public <R> R withLock(final Supplier<R> supplier) { lock.lock(); try { return supplier.get(); } finally { lock.unlock(); } }
@Nullable @Override public ManagedCache getManagedCache(@Nonnull String name) { final Supplier<ManagedCache> cacheRef = caches.get(name); return (null == cacheRef) ? null : cacheRef.get(); }
@Override public Object parseObject(final String source, final ParsePosition pos) { return delegate.get().parseObject(source, pos); }