本文整理了Java中java.util.concurrent.ConcurrentSkipListMap.higherKey()
方法的一些代码示例,展示了ConcurrentSkipListMap.higherKey()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ConcurrentSkipListMap.higherKey()
方法的具体详情如下:
包路径:java.util.concurrent.ConcurrentSkipListMap
类名称:ConcurrentSkipListMap
方法名:higherKey
暂无
代码示例来源:origin: lealone/Lealone
@Override
public K higherKey(K key) { // 大于给定key的最小key
try {
return skipListMap.higherKey(key);
} catch (NoSuchElementException e) {
return null;
}
}
代码示例来源:origin: qunarcorp/qmq
long higherBaseOffset(long low) {
Long next = segments.higherKey(low);
return next == null ? -1 : next;
}
代码示例来源:origin: apache/hbase
@Test
public void testHigherKey() throws Exception {
assertEquals(csm.higherKey(4000L), m.higherKey(4000L));
assertEquals(csm.higherKey(400L), m.higherKey(400L));
assertEquals(csm.higherKey(-1L), m.higherKey(-1L));
for ( int i =0 ; i < 100; i ++) {
Long key = ThreadLocalRandom.current().nextLong();
assertEquals(csm.higherKey(key), m.higherKey(key));
}
}
代码示例来源:origin: lealone/Lealone
if (!min) {
if (excluding)
k1 = buffer.higherKey(key);
else
k1 = buffer.ceilingKey(key);
代码示例来源:origin: cinchapi/concourse
@Override
public K higherKey(K key) {
long[] stamps = grabAllSegmentWriteLocks();
try {
sort();
return sorted.higherKey(key);
}
finally {
releaseSegmentLocks(stamps);
}
}
代码示例来源:origin: org.apache.hbase/hbase-common
@Test
public void testHigherKey() throws Exception {
assertEquals(csm.higherKey(4000L), m.higherKey(4000L));
assertEquals(csm.higherKey(400L), m.higherKey(400L));
assertEquals(csm.higherKey(-1L), m.higherKey(-1L));
for ( int i =0 ; i < 100; i ++) {
Long key = ThreadLocalRandom.current().nextLong();
assertEquals(csm.higherKey(key), m.higherKey(key));
}
}
代码示例来源:origin: com.aliyun.hbase/alihbase-common
@Test
public void testHigherKey() throws Exception {
assertEquals(csm.higherKey(4000L), m.higherKey(4000L));
assertEquals(csm.higherKey(400L), m.higherKey(400L));
assertEquals(csm.higherKey(-1L), m.higherKey(-1L));
for ( int i =0 ; i < 100; i ++) {
Long key = ThreadLocalRandom.current().nextLong();
assertEquals(csm.higherKey(key), m.higherKey(key));
}
}
代码示例来源:origin: org.apache.apex/apex-engine
endWindowStatsOperatorMap.remove(windowId);
windowId = endWindowStatsOperatorMap.higherKey(windowId);
代码示例来源:origin: org.forgerock.ce.opendj/opendj-ldap-sdk
@Override
public void handleDelete(final RequestContext requestContext, final DeleteRequest request,
final IntermediateResponseHandler intermediateResponseHandler,
final ResultHandler<Result> resultHandler) {
try {
final Entry entry;
synchronized (writeLock) {
final DN dn = request.getName();
entry = getRequiredEntry(request, dn);
if (request.getControl(SubtreeDeleteRequestControl.DECODER, decodeOptions) != null) {
// Subtree delete.
entries.subMap(dn, dn.child(RDN.maxValue())).clear();
} else {
// Must be leaf.
final DN next = entries.higherKey(dn);
if (next == null || !next.isChildOf(dn)) {
entries.remove(dn);
} else {
throw newErrorResult(ResultCode.NOT_ALLOWED_ON_NONLEAF);
}
}
}
resultHandler.handleResult(getResult(request, entry, null));
} catch (final DecodeException e) {
resultHandler.handleErrorResult(newErrorResult(ResultCode.PROTOCOL_ERROR, e));
} catch (final ErrorResultException e) {
resultHandler.handleErrorResult(e);
}
}
内容来源于网络,如有侵权,请联系作者删除!