本文整理了Java中java.util.concurrent.ConcurrentSkipListMap.descendingKeySet()
方法的一些代码示例,展示了ConcurrentSkipListMap.descendingKeySet()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ConcurrentSkipListMap.descendingKeySet()
方法的具体详情如下:
包路径:java.util.concurrent.ConcurrentSkipListMap
类名称:ConcurrentSkipListMap
方法名:descendingKeySet
暂无
代码示例来源:origin: org.apache.jackrabbit/oak-store-document
@Override
public boolean containsKey(Object key) {
for (int generation : read.descendingKeySet()) {
CacheMap<K, V> m = read.get(generation);
if (m != null) {
if (m.containsKey(key)) {
return true;
}
}
}
return false;
}
代码示例来源:origin: apache/jackrabbit-oak
@Override
public boolean containsKey(Object key) {
for (int generation : read.descendingKeySet()) {
CacheMap<K, V> m = read.get(generation);
if (m != null) {
if (m.containsKey(key)) {
return true;
}
}
}
return false;
}
代码示例来源:origin: cinchapi/concourse
@Override
public NavigableSet<K> descendingKeySet() {
long[] stamps = grabAllSegmentWriteLocks();
try {
sort();
return sorted.descendingKeySet();
}
finally {
releaseSegmentLocks(stamps);
}
}
代码示例来源:origin: apache/jackrabbit-oak
ValueWithGenerationInfo<V> readValue(Object key) {
for (int generation : read.descendingKeySet()) {
CacheMap<K, V> m = read.get(generation);
if (m != null) {
V value = m.get(key);
if (value != null) {
return new ValueWithGenerationInfo<V>(value, m == write);
}
}
}
return null;
}
代码示例来源:origin: org.apache.jackrabbit/oak-store-document
ValueWithGenerationInfo<V> readValue(Object key) {
for (int generation : read.descendingKeySet()) {
CacheMap<K, V> m = read.get(generation);
if (m != null) {
V value = m.get(key);
if (value != null) {
return new ValueWithGenerationInfo<V>(value, m == write);
}
}
}
return null;
}
代码示例来源:origin: org.apache.apex/malhar-library
private Slice getFromMemory(Slice key)
{
//search the cache for key
BucketedValue bucketedValue = flash.get(key);
if (bucketedValue != null) {
return bucketedValue.getValue();
}
for (Long window : checkpointedData.descendingKeySet()) {
//traverse the checkpointed data in reverse order
bucketedValue = checkpointedData.get(window).get(key);
if (bucketedValue != null) {
return bucketedValue.getValue();
}
}
for (Long window : committedData.descendingKeySet()) {
//traverse the committed data in reverse order
bucketedValue = committedData.get(window).get(key);
if (bucketedValue != null) {
return bucketedValue.getValue();
}
}
bucketedValue = fileCache.get(key);
if (bucketedValue != null) {
return bucketedValue.getValue();
}
return null;
}
代码示例来源:origin: apache/jackrabbit-oak
/**
* Gets the most recent unsaved last revision at <code>readRevision</code>
* or earlier in this branch for the given <code>path</code>. Documents with
* explicit updates are not tracked and this method may return {@code null}.
*
* @param path the path of a node.
* @param readRevision the read revision.
* @return the most recent unsaved last revision or <code>null</code> if
* there is none in this branch.
*/
@Nullable
public Revision getUnsavedLastRevision(String path,
Revision readRevision) {
readRevision = readRevision.asBranchRevision();
for (Revision r : commits.descendingKeySet()) {
if (readRevision.compareRevisionTime(r) < 0) {
continue;
}
BranchCommit c = commits.get(r);
if (c.isModified(path)) {
return r;
}
}
return null;
}
代码示例来源:origin: org.apache.jackrabbit/oak-store-document
/**
* Gets the most recent unsaved last revision at <code>readRevision</code>
* or earlier in this branch for the given <code>path</code>. Documents with
* explicit updates are not tracked and this method may return {@code null}.
*
* @param path the path of a node.
* @param readRevision the read revision.
* @return the most recent unsaved last revision or <code>null</code> if
* there is none in this branch.
*/
@Nullable
public Revision getUnsavedLastRevision(String path,
Revision readRevision) {
readRevision = readRevision.asBranchRevision();
for (Revision r : commits.descendingKeySet()) {
if (readRevision.compareRevisionTime(r) < 0) {
continue;
}
BranchCommit c = commits.get(r);
if (c.isModified(path)) {
return r;
}
}
return null;
}
内容来源于网络,如有侵权,请联系作者删除!