use of com.cinchapi.concourse.server.aop.VerifyWritePermission in project concourse by cinchapi.
the class ConcourseServer method clearKeysRecord.
@Override
@TranslateClientExceptions
@VerifyAccessToken
@VerifyWritePermission
public void clearKeysRecord(List<String> keys, long record, AccessToken creds, TransactionToken transaction, String environment) throws TException {
AtomicSupport store = getStore(transaction, environment);
AtomicOperations.executeWithRetry(store, (atomic) -> {
for (String key : keys) {
Operations.clearKeyRecordAtomic(key, record, atomic);
}
});
}
use of com.cinchapi.concourse.server.aop.VerifyWritePermission in project concourse by cinchapi.
the class ConcourseServer method reconcileKeyRecordValues.
@Override
@TranslateClientExceptions
@VerifyAccessToken
@VerifyWritePermission
public void reconcileKeyRecordValues(String key, long record, Set<TObject> values, AccessToken creds, TransactionToken transaction, String environment) throws TException {
AtomicSupport store = getStore(transaction, environment);
AtomicOperations.executeWithRetry(store, (atomic) -> {
Set<TObject> existingValues = store.select(key, record);
for (TObject existingValue : existingValues) {
if (!values.remove(existingValue)) {
atomic.remove(key, existingValue, record);
}
}
for (TObject value : values) {
atomic.add(key, value, record);
}
});
}
Aggregations