热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

com.thinkaurelius.titan.diskstorage.keycolumnvalue.KeySliceQuery.getLimit()方法的使用及代码示例

本文整理了Java中com.thinkaurelius.titan.diskstorage.keycolumnvalue.KeySliceQuery.getLimit()

本文整理了Java中com.thinkaurelius.titan.diskstorage.keycolumnvalue.KeySliceQuery.getLimit()方法的一些代码示例,展示了KeySliceQuery.getLimit()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。KeySliceQuery.getLimit()方法的具体详情如下:
包路径:com.thinkaurelius.titan.diskstorage.keycolumnvalue.KeySliceQuery
类名称:KeySliceQuery
方法名:getLimit

KeySliceQuery.getLimit介绍

暂无

代码示例

代码示例来源:origin: thinkaurelius/titan

@Override
public String toString() {
return String.format("KeySliceQuery(key: %s, start: %s, end: %s, limit:%d)", key, getSliceStart(), getSliceEnd(), getLimit());
}
}

代码示例来源:origin: thinkaurelius/titan

final KVQuery convertQuery(final KeySliceQuery query) {
Predicate filter = Predicates.alwaysTrue();
if (!hasFixedKeyLength()) filter = new Predicate() {
@Override
public boolean apply(@Nullable StaticBuffer keyAndColumn) {
return equalKey(keyAndColumn, query.getKey());
}
};
return new KVQuery(
concatenatePrefix(query.getKey(), query.getSliceStart()),
concatenatePrefix(query.getKey(), query.getSliceEnd()),
filter,query.getLimit());
}

代码示例来源:origin: thinkaurelius/titan

EntryList getSlice(KeySliceQuery query, StoreTransaction txh) {
Lock lock = getLock(txh);
lock.lock();
try {
Data datacp = data;
int start = datacp.getIndex(query.getSliceStart());
if (start <0) start = (-start - 1);
int end = datacp.getIndex(query.getSliceEnd());
if (end <0) end = (-end - 1);
if (start MemoryEntryList result = new MemoryEntryList(end - start);
for (int i = start; i if (query.hasLimit() && result.size() >= query.getLimit()) break;
result.add(datacp.get(i));
}
return result;
} else {
return EntryList.EMPTY_LIST;
}
} finally {
lock.unlock();
}
}

代码示例来源:origin: thinkaurelius/titan

Composite endComposite = CellNames.simpleDense(query.getSliceEnd().asByteBuffer());
SliceQueryFilter sqf = new SliceQueryFilter(startComposite, endComposite,
false, query.getLimit() + (query.hasLimit()?1:0));
ReadCommand sliceCmd = new SliceFromReadCommand(keyspace, query.getKey().asByteBuffer(), columnFamily, nowMillis, sqf);
entryGetter,
query.getSliceEnd(),
query.getLimit());

代码示例来源:origin: org.hawkular.titan/titan-core

@Override
public String toString() {
return String.format("KeySliceQuery(key: %s, start: %s, end: %s, limit:%d)", key, getSliceStart(), getSliceEnd(), getLimit());
}
}

代码示例来源:origin: com.thinkaurelius.titan/titan-core

@Override
public String toString() {
return String.format("KeySliceQuery(key: %s, start: %s, end: %s, limit:%d)", key, getSliceStart(), getSliceEnd(), getLimit());
}
}

代码示例来源:origin: com.thinkaurelius.titan/titan-hazelcast

if (query.hasLimit() && count >= query.getLimit())
break;

代码示例来源:origin: com.thinkaurelius.titan/titan-core

final KVQuery convertQuery(final KeySliceQuery query) {
Predicate filter = Predicates.alwaysTrue();
if (!hasFixedKeyLength()) filter = new Predicate() {
@Override
public boolean apply(@Nullable StaticBuffer keyAndColumn) {
return equalKey(keyAndColumn, query.getKey());
}
};
return new KVQuery(
concatenatePrefix(query.getKey(), query.getSliceStart()),
concatenatePrefix(query.getKey(), query.getSliceEnd()),
filter,query.getLimit());
}

代码示例来源:origin: org.hawkular.titan/titan-core

final KVQuery convertQuery(final KeySliceQuery query) {
Predicate filter = Predicates.alwaysTrue();
if (!hasFixedKeyLength()) filter = new Predicate() {
@Override
public boolean apply(@Nullable StaticBuffer keyAndColumn) {
return equalKey(keyAndColumn, query.getKey());
}
};
return new KVQuery(
concatenatePrefix(query.getKey(), query.getSliceStart()),
concatenatePrefix(query.getKey(), query.getSliceEnd()),
filter,query.getLimit());
}

代码示例来源:origin: org.hawkular.titan/titan-core

EntryList getSlice(KeySliceQuery query, StoreTransaction txh) {
Lock lock = getLock(txh);
lock.lock();
try {
Data datacp = data;
int start = datacp.getIndex(query.getSliceStart());
if (start <0) start = (-start - 1);
int end = datacp.getIndex(query.getSliceEnd());
if (end <0) end = (-end - 1);
if (start MemoryEntryList result = new MemoryEntryList(end - start);
for (int i = start; i if (query.hasLimit() && result.size() >= query.getLimit()) break;
result.add(datacp.get(i));
}
return result;
} else {
return EntryList.EMPTY_LIST;
}
} finally {
lock.unlock();
}
}

代码示例来源:origin: com.thinkaurelius.titan/titan-core

EntryList getSlice(KeySliceQuery query, StoreTransaction txh) {
Lock lock = getLock(txh);
lock.lock();
try {
Data datacp = data;
int start = datacp.getIndex(query.getSliceStart());
if (start <0) start = (-start - 1);
int end = datacp.getIndex(query.getSliceEnd());
if (end <0) end = (-end - 1);
if (start MemoryEntryList result = new MemoryEntryList(end - start);
for (int i = start; i if (query.hasLimit() && result.size() >= query.getLimit()) break;
result.add(datacp.get(i));
}
return result;
} else {
return EntryList.EMPTY_LIST;
}
} finally {
lock.unlock();
}
}

代码示例来源:origin: org.hawkular.titan/titan-cassandra

SliceQueryFilter sqf = new SliceQueryFilter(query.getSliceStart().asByteBuffer(), query.getSliceEnd().asByteBuffer(), false, query.getLimit() + (query.hasLimit()?1:0));
ReadCommand sliceCmd = new SliceFromReadCommand(keyspace, query.getKey().asByteBuffer(), columnFamily, nowMillis, sqf);
entryGetter,
query.getSliceEnd(),
query.getLimit());

代码示例来源:origin: com.thinkaurelius.titan/titan-cassandra

Composite endComposite = CellNames.simpleDense(query.getSliceEnd().asByteBuffer());
SliceQueryFilter sqf = new SliceQueryFilter(startComposite, endComposite,
false, query.getLimit() + (query.hasLimit()?1:0));
ReadCommand sliceCmd = new SliceFromReadCommand(keyspace, query.getKey().asByteBuffer(), columnFamily, nowMillis, sqf);
entryGetter,
query.getSliceEnd(),
query.getLimit());

推荐阅读
author-avatar
_自己疼__374
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有