use of com.cinchapi.concourse.thrift.TPage in project concourse by cinchapi.
the class ConcourseServer method getKeysCclPage.
@Override
@TranslateClientExceptions
@VerifyAccessToken
@VerifyReadPermission
public Map<Long, Map<String, TObject>> getKeysCclPage(List<String> keys, String ccl, TPage page, AccessToken creds, TransactionToken transaction, String environment) throws TException {
try {
AbstractSyntaxTree ast = compiler.parse(ccl);
AtomicSupport store = getStore(transaction, environment);
SortableTable<TObject> result = SortableTable.singleValued(Maps.newLinkedHashMap());
AtomicOperations.executeWithRetry(store, atomic -> Operations.getKeysAstAtomic(keys, ast, Time.NONE, result, records -> Paging.paginate(records, Pages.from(page)), null, atomic));
return result;
} catch (Exception e) {
throw new ParseException(e.getMessage());
}
}
use of com.cinchapi.concourse.thrift.TPage in project concourse by cinchapi.
the class ConcourseServer method selectKeyRecordsPage.
@Override
@TranslateClientExceptions
@VerifyAccessToken
@VerifyReadPermission
public Map<Long, Set<TObject>> selectKeyRecordsPage(String key, List<Long> records, TPage page, AccessToken creds, TransactionToken transaction, String environment) throws TException {
AtomicSupport store = getStore(transaction, environment);
SortableColumn<Set<TObject>> result = SortableColumn.multiValued(key, TMaps.newLinkedHashMapWithCapacity(records.size()));
AtomicOperations.executeWithRetry(store, atomic -> Operations.selectKeyRecordsAtomic(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 getKeysRecordsPage.
@Override
@TranslateClientExceptions
@VerifyAccessToken
@VerifyReadPermission
public Map<Long, Map<String, TObject>> getKeysRecordsPage(List<String> keys, List<Long> records, TPage page, AccessToken creds, TransactionToken transaction, String environment) throws TException {
AtomicSupport store = getStore(transaction, environment);
SortableTable<TObject> result = SortableTable.singleValued(Maps.newLinkedHashMap());
AtomicOperations.executeWithRetry(store, atomic -> Operations.getKeysRecordsAtomic(keys, 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 getKeyCriteriaPage.
@Override
@TranslateClientExceptions
@VerifyAccessToken
@VerifyReadPermission
public Map<Long, TObject> getKeyCriteriaPage(String key, TCriteria criteria, TPage page, AccessToken creds, TransactionToken transaction, String environment) throws TException {
AbstractSyntaxTree ast = compiler.parse(criteria);
AtomicSupport store = getStore(transaction, environment);
SortableColumn<TObject> result = SortableColumn.singleValued(key, Maps.newLinkedHashMap());
AtomicOperations.executeWithRetry(store, atomic -> Operations.getKeyAstAtomic(key, 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 selectKeysRecordsPage.
@Override
@TranslateClientExceptions
@VerifyAccessToken
@VerifyReadPermission
public Map<Long, Map<String, Set<TObject>>> selectKeysRecordsPage(List<String> keys, List<Long> records, TPage page, AccessToken creds, TransactionToken transaction, String environment) throws TException {
AtomicSupport store = getStore(transaction, environment);
SortableTable<Set<TObject>> result = emptySortableResultDatasetWithCapacity(records.size());
AtomicOperations.executeWithRetry(store, atomic -> Operations.selectKeysRecordsAtomic(keys, records, result, $records -> Paging.paginate($records, Pages.from(page)), null, atomic));
return result;
}
Aggregations