use of com.cinchapi.concourse.thrift.TPage in project concourse by cinchapi.
the class ConcourseServer method selectCriteriaPage.
@Override
@TranslateClientExceptions
@VerifyAccessToken
@VerifyReadPermission
public Map<Long, Map<String, Set<TObject>>> selectCriteriaPage(TCriteria criteria, TPage page, AccessToken creds, TransactionToken transaction, String environment) throws TException {
AbstractSyntaxTree ast = compiler.parse(criteria);
AtomicSupport store = getStore(transaction, environment);
SortableTable<Set<TObject>> result = emptySortableResultDataset();
AtomicOperations.executeWithRetry(store, atomic -> Operations.selectAstAtomic(ast, Time.NONE, result, records -> Paging.paginate(records, Pages.from(page)), null, atomic));
return result;
}
use of com.cinchapi.concourse.thrift.TPage in project concourse by cinchapi.
the class ConcourseServer method selectKeysCriteriaPage.
@Override
@TranslateClientExceptions
@VerifyAccessToken
@VerifyReadPermission
public Map<Long, Map<String, Set<TObject>>> selectKeysCriteriaPage(List<String> keys, TCriteria criteria, TPage page, AccessToken creds, TransactionToken transaction, String environment) throws TException {
AbstractSyntaxTree ast = compiler.parse(criteria);
AtomicSupport store = getStore(transaction, environment);
SortableTable<Set<TObject>> result = emptySortableResultDataset();
AtomicOperations.executeWithRetry(store, atomic -> Operations.selectKeysAstAtomic(keys, ast, Time.NONE, result, records -> Paging.paginate(records, Pages.from(page)), null, atomic));
return result;
}
use of com.cinchapi.concourse.thrift.TPage in project concourse by cinchapi.
the class ConcourseServer method getKeyRecordsPage.
@Override
@TranslateClientExceptions
@VerifyAccessToken
@VerifyReadPermission
public Map<Long, TObject> getKeyRecordsPage(String key, List<Long> records, TPage page, AccessToken creds, TransactionToken transaction, String environment) throws TException {
AtomicSupport store = getStore(transaction, environment);
SortableColumn<TObject> result = SortableColumn.singleValued(key, TMaps.newLinkedHashMapWithCapacity(records.size()));
AtomicOperations.executeWithRetry(store, atomic -> Operations.getKeyRecordsAtomic(key, records, result, $records -> Paging.paginate($records, Pages.from(page)), null, atomic));
return result;
}
use of com.cinchapi.concourse.thrift.TPage in project concourse by cinchapi.
the class ConcourseServer method getCriteriaPage.
@Override
@TranslateClientExceptions
@VerifyAccessToken
@VerifyReadPermission
public Map<Long, Map<String, TObject>> getCriteriaPage(TCriteria criteria, TPage page, AccessToken creds, TransactionToken transaction, String environment) throws TException {
AbstractSyntaxTree ast = compiler.parse(criteria);
AtomicSupport store = getStore(transaction, environment);
SortableTable<TObject> result = SortableTable.singleValued(Maps.newLinkedHashMap());
AtomicOperations.executeWithRetry(store, atomic -> Operations.getAstAtomic(ast, Time.NONE, result, records -> Paging.paginate(records, Pages.from(page)), null, atomic));
return result;
}
Aggregations