本文整理了Java中com.google.common.cache.LocalCache.unset()
方法的一些代码示例,展示了LocalCache.unset()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。LocalCache.unset()
方法的具体详情如下:
包路径:com.google.common.cache.LocalCache
类名称:LocalCache
方法名:unset
[英]Singleton placeholder that indicates a value is being loaded.
[中]指示正在加载值的单例占位符。
代码示例来源:origin: google/guava
public LoadingValueReference(ValueReference<K, V> oldValue) {
this.oldValue = (oldValue == null) ? LocalCache.<K, V>unset() : oldValue;
}
代码示例来源:origin: wildfly/wildfly
public LoadingValueReference(ValueReference<K, V> oldValue) {
this.oldValue = (oldValue == null) ? LocalCache.<K, V>unset() : oldValue;
}
代码示例来源:origin: google/guava
@Override
public void notifyNewValue(@Nullable V newValue) {
if (newValue != null) {
// The pending load was clobbered by a manual write.
// Unblock all pending gets, and have them return the new value.
set(newValue);
} else {
// The pending load was removed. Delay notifications until loading completes.
oldValue = unset();
}
// TODO(fry): could also cancel loading if we had a handle on its future
}
代码示例来源:origin: wildfly/wildfly
@Override
public void notifyNewValue(@NullableDecl V newValue) {
if (newValue != null) {
// The pending load was clobbered by a manual write.
// Unblock all pending gets, and have them return the new value.
set(newValue);
} else {
// The pending load was removed. Delay notifications until loading completes.
oldValue = unset();
}
// TODO(fry): could also cancel loading if we had a handle on its future
}
代码示例来源:origin: com.diffplug.guava/guava-cache
public LoadingValueReference() {
this(LocalCache.<K, V> unset());
}
代码示例来源:origin: org.jboss.eap/wildfly-client-all
public LoadingValueReference(ValueReference<K, V> oldValue) {
this.oldValue = (oldValue == null) ? LocalCache.<K, V>unset() : oldValue;
}
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby
public LoadingValueReference() {
this(LocalCache.<K, V>unset());
}
代码示例来源:origin: Nextdoor/bender
public LoadingValueReference() {
this(LocalCache.<K, V>unset());
}
代码示例来源:origin: org.sonatype.sisu/sisu-guava
public LoadingValueReference() {
this(LocalCache.<K, V>unset());
}
代码示例来源:origin: com.diffplug.guava/guava-cache
@Override
public void notifyNewValue(@Nullable V newValue) {
if (newValue != null) {
// The pending load was clobbered by a manual write.
// Unblock all pending gets, and have them return the new value.
set(newValue);
} else {
// The pending load was removed. Delay notifications until loading completes.
oldValue = unset();
}
// TODO(fry): could also cancel loading if we had a handle on its future
}
代码示例来源:origin: at.bestsolution.efxclipse.eclipse/com.google.guava
@Override
public void notifyNewValue(@Nullable V newValue) {
if (newValue != null) {
// The pending load was clobbered by a manual write.
// Unblock all pending gets, and have them return the new value.
set(newValue);
} else {
// The pending load was removed. Delay notifications until loading completes.
oldValue = unset();
}
// TODO(fry): could also cancel loading if we had a handle on its future
}
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby
@Override
public void notifyNewValue(@Nullable V newValue) {
if (newValue != null) {
// The pending load was clobbered by a manual write.
// Unblock all pending gets, and have them return the new value.
set(newValue);
} else {
// The pending load was removed. Delay notifications until loading completes.
oldValue = unset();
}
// TODO(fry): could also cancel loading if we had a handle on its future
}
代码示例来源:origin: com.google.guava/guava-jdk5
@Override
public void notifyNewValue(@Nullable V newValue) {
if (newValue != null) {
// The pending load was clobbered by a manual write.
// Unblock all pending gets, and have them return the new value.
set(newValue);
} else {
// The pending load was removed. Delay notifications until loading completes.
oldValue = unset();
}
// TODO(fry): could also cancel loading if we had a handle on its future
}
代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby
@Override
public void notifyNewValue(@Nullable V newValue) {
if (newValue != null) {
// The pending load was clobbered by a manual write.
// Unblock all pending gets, and have them return the new value.
set(newValue);
} else {
// The pending load was removed. Delay notifications until loading completes.
oldValue = unset();
}
// TODO(fry): could also cancel loading if we had a handle on its future
}
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-analytics
@Override
public void notifyNewValue(@Nullable V newValue) {
if (newValue != null) {
// The pending load was clobbered by a manual write.
// Unblock all pending gets, and have them return the new value.
set(newValue);
} else {
// The pending load was removed. Delay notifications until loading completes.
oldValue = unset();
}
// TODO(fry): could also cancel loading if we had a handle on its future
}
代码示例来源:origin: Nextdoor/bender
@Override
public void notifyNewValue(@Nullable V newValue) {
if (newValue != null) {
// The pending load was clobbered by a manual write.
// Unblock all pending gets, and have them return the new value.
set(newValue);
} else {
// The pending load was removed. Delay notifications until loading completes.
oldValue = unset();
}
// TODO(fry): could also cancel loading if we had a handle on its future
}
代码示例来源:origin: org.sonatype.sisu/sisu-guava
@Override
public void notifyNewValue(@Nullable V newValue) {
if (newValue != null) {
// The pending load was clobbered by a manual write.
// Unblock all pending gets, and have them return the new value.
set(newValue);
} else {
// The pending load was removed. Delay notifications until loading completes.
oldValue = unset();
}
// TODO(fry): could also cancel loading if we had a handle on its future
}
代码示例来源:origin: org.hudsonci.lib.guava/guava
@Override
public void notifyNewValue(@Nullable V newValue) {
if (newValue != null) {
// The pending load was clobbered by a manual write.
// Unblock all pending gets, and have them return the new value.
set(newValue);
} else {
// The pending load was removed. Delay notifications until loading completes.
oldValue = unset();
}
// TODO(fry): could also cancel loading if we had a handle on its future
}
代码示例来源:origin: org.jboss.eap/wildfly-client-all
@Override
public void notifyNewValue(@NullableDecl V newValue) {
if (newValue != null) {
// The pending load was clobbered by a manual write.
// Unblock all pending gets, and have them return the new value.
set(newValue);
} else {
// The pending load was removed. Delay notifications until loading completes.
oldValue = unset();
}
// TODO(fry): could also cancel loading if we had a handle on its future
}
代码示例来源:origin: org.kill-bill.billing/killbill-platform-osgi-bundles-logger
@Override
public void notifyNewValue(@Nullable V newValue) {
if (newValue != null) {
// The pending load was clobbered by a manual write.
// Unblock all pending gets, and have them return the new value.
set(newValue);
} else {
// The pending load was removed. Delay notifications until loading completes.
oldValue = unset();
}
// TODO(fry): could also cancel loading if we had a handle on its future
}
内容来源于网络,如有侵权,请联系作者删除!