use of com.cinchapi.concourse.server.aop.VerifyReadPermission in project concourse by cinchapi.
the class ConcourseServer method getKeyCclTimeOrder.
@Override
@TranslateClientExceptions
@VerifyAccessToken
@VerifyReadPermission
public Map<Long, TObject> getKeyCclTimeOrder(String key, String ccl, long timestamp, TOrder order, AccessToken creds, TransactionToken transaction, String environment) throws TException {
try {
AbstractSyntaxTree ast = compiler.parse(ccl);
AtomicSupport store = getStore(transaction, environment);
SortableColumn<TObject> result = SortableColumn.singleValued(key, Maps.newLinkedHashMap());
AtomicOperations.executeWithRetry(store, atomic -> Operations.getKeyAstAtomic(key, ast, timestamp, result, null, $result -> $result.sort(Sorting.byValue(Orders.from(order), atomic), timestamp), atomic));
return result;
} catch (Exception e) {
throw new ParseException(e.getMessage());
}
}
use of com.cinchapi.concourse.server.aop.VerifyReadPermission in project concourse by cinchapi.
the class ConcourseServer method selectRecordsOrder.
@Override
@TranslateClientExceptions
@VerifyAccessToken
@VerifyReadPermission
public Map<Long, Map<String, Set<TObject>>> selectRecordsOrder(List<Long> records, TOrder order, 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.selectRecordsAtomic(records, result, null, $result -> $result.sort(Sorting.byValues(Orders.from(order), atomic)), atomic));
return result;
}
use of com.cinchapi.concourse.server.aop.VerifyReadPermission in project concourse by cinchapi.
the class ConcourseServer method selectKeyRecordsOrder.
@Override
@TranslateClientExceptions
@VerifyAccessToken
@VerifyReadPermission
public Map<Long, Set<TObject>> selectKeyRecordsOrder(String key, List<Long> records, TOrder order, 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, null, $result -> $result.sort(Sorting.byValues(Orders.from(order), atomic)), atomic));
return result;
}
use of com.cinchapi.concourse.server.aop.VerifyReadPermission in project concourse by cinchapi.
the class ConcourseServer method selectKeysCclTimeOrder.
@Override
@TranslateClientExceptions
@VerifyAccessToken
@VerifyReadPermission
public Map<Long, Map<String, Set<TObject>>> selectKeysCclTimeOrder(List<String> keys, String ccl, long timestamp, TOrder order, AccessToken creds, TransactionToken transaction, String environment) throws TException {
try {
AbstractSyntaxTree ast = compiler.parse(ccl);
AtomicSupport store = getStore(transaction, environment);
SortableTable<Set<TObject>> result = emptySortableResultDataset();
AtomicOperations.executeWithRetry(store, atomic -> Operations.selectKeysAstAtomic(keys, ast, timestamp, result, null, $result -> $result.sort(Sorting.byValues(Orders.from(order), atomic), timestamp), atomic));
return result;
} catch (Exception e) {
throw new ParseException(e.getMessage());
}
}
use of com.cinchapi.concourse.server.aop.VerifyReadPermission in project concourse by cinchapi.
the class ConcourseServer method selectKeysRecordTime.
@Override
@TranslateClientExceptions
@VerifyAccessToken
@VerifyReadPermission
public Map<String, Set<TObject>> selectKeysRecordTime(List<String> keys, long record, long timestamp, AccessToken creds, TransactionToken transaction, String environment) throws TException {
AtomicSupport store = getStore(transaction, environment);
Map<String, Set<TObject>> result = TMaps.newLinkedHashMapWithCapacity(keys.size());
for (String key : keys) {
result.put(key, Stores.select(store, key, record, timestamp));
}
return result;
}
Aggregations