Search in sources :

Example 21 with SortableTable

use of com.cinchapi.concourse.data.sort.SortableTable in project concourse by cinchapi.

the class ConcourseServer method getCclTimePage.

@Override
@TranslateClientExceptions
@VerifyAccessToken
@VerifyReadPermission
public Map<Long, Map<String, TObject>> getCclTimePage(String ccl, long timestamp, TPage page, AccessToken creds, TransactionToken transaction, String environment) throws TException {
    AbstractSyntaxTree ast = compiler.parse(ccl);
    AtomicSupport store = getStore(transaction, environment);
    Supplier<SortableTable<TObject>> supplier = () -> SortableTable.singleValued(new LinkedHashMap<>());
    return Operations.getAstOptionalAtomic(store, ast, timestamp, Orders.from(NO_ORDER), Pages.from(page), supplier);
}
Also used : AbstractSyntaxTree(com.cinchapi.ccl.syntax.AbstractSyntaxTree) AtomicSupport(com.cinchapi.concourse.server.storage.AtomicSupport) SortableTable(com.cinchapi.concourse.data.sort.SortableTable) VerifyAccessToken(com.cinchapi.concourse.server.aop.VerifyAccessToken) VerifyReadPermission(com.cinchapi.concourse.server.aop.VerifyReadPermission) TranslateClientExceptions(com.cinchapi.concourse.server.aop.TranslateClientExceptions)

Example 22 with SortableTable

use of com.cinchapi.concourse.data.sort.SortableTable in project concourse by cinchapi.

the class ConcourseServer method getKeysRecordsTimeOrderPage.

@Override
@TranslateClientExceptions
@VerifyAccessToken
@VerifyReadPermission
public Map<Long, Map<String, TObject>> getKeysRecordsTimeOrderPage(List<String> keys, List<Long> records, long timestamp, TOrder order, TPage page, AccessToken creds, TransactionToken transaction, String environment) throws TException {
    AtomicSupport store = getStore(transaction, environment);
    Supplier<SortableTable<TObject>> supplier = () -> SortableTable.singleValued(new LinkedHashMap<>(records.size()));
    return AtomicOperations.supplyWithRetry(store, atomic -> Operations.getKeysRecordsOptionalAtomic(atomic, keys, records, timestamp, Orders.from(order), Pages.from(page), supplier));
}
Also used : AtomicSupport(com.cinchapi.concourse.server.storage.AtomicSupport) SortableTable(com.cinchapi.concourse.data.sort.SortableTable) VerifyAccessToken(com.cinchapi.concourse.server.aop.VerifyAccessToken) VerifyReadPermission(com.cinchapi.concourse.server.aop.VerifyReadPermission) TranslateClientExceptions(com.cinchapi.concourse.server.aop.TranslateClientExceptions)

Example 23 with SortableTable

use of com.cinchapi.concourse.data.sort.SortableTable in project concourse by cinchapi.

the class ConcourseServer method getKeysCriteriaOrderPage.

@Override
@TranslateClientExceptions
@VerifyAccessToken
@VerifyReadPermission
public Map<Long, Map<String, TObject>> getKeysCriteriaOrderPage(List<String> keys, TCriteria criteria, TOrder order, TPage page, AccessToken creds, TransactionToken transaction, String environment) throws TException {
    AbstractSyntaxTree ast = compiler.parse(criteria);
    AtomicSupport store = getStore(transaction, environment);
    Supplier<SortableTable<TObject>> supplier = () -> SortableTable.singleValued(new LinkedHashMap<>());
    return AtomicOperations.supplyWithRetry(store, atomic -> Operations.getKeysAstAtomic(atomic, keys, ast, Orders.from(order), Pages.from(page), supplier));
}
Also used : AbstractSyntaxTree(com.cinchapi.ccl.syntax.AbstractSyntaxTree) AtomicSupport(com.cinchapi.concourse.server.storage.AtomicSupport) SortableTable(com.cinchapi.concourse.data.sort.SortableTable) VerifyAccessToken(com.cinchapi.concourse.server.aop.VerifyAccessToken) VerifyReadPermission(com.cinchapi.concourse.server.aop.VerifyReadPermission) TranslateClientExceptions(com.cinchapi.concourse.server.aop.TranslateClientExceptions)

Example 24 with SortableTable

use of com.cinchapi.concourse.data.sort.SortableTable in project concourse by cinchapi.

the class ConcourseServer method selectCclTimeOrderPage.

@Override
@TranslateClientExceptions
@VerifyAccessToken
@VerifyReadPermission
public Map<Long, Map<String, Set<TObject>>> selectCclTimeOrderPage(String ccl, long timestamp, TOrder order, TPage page, AccessToken creds, TransactionToken transaction, String environment) throws TException {
    AbstractSyntaxTree ast = compiler.parse(ccl);
    AtomicSupport store = getStore(transaction, environment);
    Supplier<SortableTable<Set<TObject>>> supplier = () -> emptySortableResultDataset();
    return AtomicOperations.supplyWithRetry(store, atomic -> Operations.selectAstOptionalAtomic(atomic, ast, timestamp, Orders.from(order), Pages.from(page), supplier));
}
Also used : ComplexTObject(com.cinchapi.concourse.thrift.ComplexTObject) TObject(com.cinchapi.concourse.thrift.TObject) AbstractSyntaxTree(com.cinchapi.ccl.syntax.AbstractSyntaxTree) AtomicSupport(com.cinchapi.concourse.server.storage.AtomicSupport) SortableTable(com.cinchapi.concourse.data.sort.SortableTable) VerifyAccessToken(com.cinchapi.concourse.server.aop.VerifyAccessToken) VerifyReadPermission(com.cinchapi.concourse.server.aop.VerifyReadPermission) TranslateClientExceptions(com.cinchapi.concourse.server.aop.TranslateClientExceptions)

Example 25 with SortableTable

use of com.cinchapi.concourse.data.sort.SortableTable in project concourse by cinchapi.

the class ConcourseServer method selectKeysRecordsTimeOrderPage.

@Override
@TranslateClientExceptions
@VerifyAccessToken
@VerifyReadPermission
public Map<Long, Map<String, Set<TObject>>> selectKeysRecordsTimeOrderPage(List<String> keys, List<Long> records, long timestamp, TOrder order, TPage page, AccessToken creds, TransactionToken transaction, String environment) throws TException {
    AtomicSupport store = getStore(transaction, environment);
    Supplier<SortableTable<Set<TObject>>> supplier = () -> emptySortableResultDataset();
    return AtomicOperations.supplyWithRetry(store, atomic -> Operations.selectKeysRecordsOptionalAtomic(atomic, keys, records, timestamp, Orders.from(order), Pages.from(page), supplier));
}
Also used : ComplexTObject(com.cinchapi.concourse.thrift.ComplexTObject) TObject(com.cinchapi.concourse.thrift.TObject) AtomicSupport(com.cinchapi.concourse.server.storage.AtomicSupport) SortableTable(com.cinchapi.concourse.data.sort.SortableTable) VerifyAccessToken(com.cinchapi.concourse.server.aop.VerifyAccessToken) VerifyReadPermission(com.cinchapi.concourse.server.aop.VerifyReadPermission) TranslateClientExceptions(com.cinchapi.concourse.server.aop.TranslateClientExceptions)

Aggregations

SortableTable (com.cinchapi.concourse.data.sort.SortableTable)64 TranslateClientExceptions (com.cinchapi.concourse.server.aop.TranslateClientExceptions)63 VerifyAccessToken (com.cinchapi.concourse.server.aop.VerifyAccessToken)63 VerifyReadPermission (com.cinchapi.concourse.server.aop.VerifyReadPermission)63 AtomicSupport (com.cinchapi.concourse.server.storage.AtomicSupport)63 AbstractSyntaxTree (com.cinchapi.ccl.syntax.AbstractSyntaxTree)54 TObject (com.cinchapi.concourse.thrift.TObject)49 ComplexTObject (com.cinchapi.concourse.thrift.ComplexTObject)48 Order (com.cinchapi.concourse.lang.sort.Order)31 NaturalLanguage (com.cinchapi.ccl.util.NaturalLanguage)30 AnyStrings (com.cinchapi.common.base.AnyStrings)30 Array (com.cinchapi.common.base.Array)30 CheckedExceptions (com.cinchapi.common.base.CheckedExceptions)30 Reflection (com.cinchapi.common.reflect.Reflection)30 Constants (com.cinchapi.concourse.Constants)30 Link (com.cinchapi.concourse.Link)30 Timestamp (com.cinchapi.concourse.Timestamp)30 SortableColumn (com.cinchapi.concourse.data.sort.SortableColumn)30 SortableSet (com.cinchapi.concourse.data.sort.SortableSet)30 ConcourseCompiler (com.cinchapi.concourse.lang.ConcourseCompiler)30