Package com.twicedb.client.impl
Class ClientImpl
java.lang.Object
com.twicedb.client.impl.ClientImpl
- All Implemented Interfaces:
 Client
An implementation of the TwiceDB client API. Such an implementation is necessary in order to
 query TwiceDB. After instantiating the class, one must also call the start() method to start
 background processes.
- 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionbuildAggregationResponse(ReadResponse.ReadCommandResponse r, boolean requireInteger) catchUpLsqt(Tt catchUpTo, Duration maxWaitDuration) booleanbooleancommitTxnAsync(Txn txn) <I extends Indexable<I>>
AggregationResponsecountByIndexedQuery(IndexedQuery<I> iq, TemporalCoordinates tc) <I extends Indexable<I>>
Future<AggregationResponse>deleteAsync(ObjectId objectId, Tt lastRead, Vt vtFrom) <I extends Indexable<I>>
WrittenObjectdeleteObject(I object, Vt vtFrom) <I extends Indexable<I>>
Future<WriteAsyncResponse>deleteObjectAsync(I object, Vt vtFrom) entitle(EmailAddress emailAddress, Fqn fqn, ReadEntitlement read, WriteEntitlement write, EntitleEntitlement entitle, Vt vt, BackfillTt backfillTt) Sets new entitlements.getLsqt()longgetServerStatus(ServerType serverType) Returns a ServerStatus object that contains basic information about the reader or the writer to which the client is connected.long<I extends Indexable<I>>
AggregationResponsemaxByIndexedQuery(IndexedQuery<I> iq, ProjectedFieldKey fieldKey, TemporalCoordinates tc) <I extends Indexable<I>>
Future<AggregationResponse>maxByIndexedQueryAsync(IndexedQuery<I> iq, ProjectedFieldKey fieldKey, TemporalCoordinates tc) <I extends Indexable<I>>
AggregationResponsemeanByIndexedQuery(IndexedQuery<I> iq, ProjectedFieldKey fieldKey, TemporalCoordinates tc) <I extends Indexable<I>>
Future<AggregationResponse>meanByIndexedQueryAsync(IndexedQuery<I> iq, ProjectedFieldKey fieldKey, TemporalCoordinates tc) <I extends Indexable<I>>
AggregationResponsemedianByIndexedQuery(IndexedQuery<I> iq, ProjectedFieldKey fieldKey, TemporalCoordinates tc) <I extends Indexable<I>>
Future<AggregationResponse>medianByIndexedQueryAsync(IndexedQuery<I> iq, ProjectedFieldKey fieldKey, TemporalCoordinates tc) <I extends Indexable<I>>
AggregationResponseminByIndexedQuery(IndexedQuery<I> iq, ProjectedFieldKey fieldKey, TemporalCoordinates tc) <I extends Indexable<I>>
Future<AggregationResponse>minByIndexedQueryAsync(IndexedQuery<I> iq, ProjectedFieldKey fieldKey, TemporalCoordinates tc) <I extends Indexable<I>>
AggregationResponsepercentileByIndexedQuery(IndexedQuery<I> iq, ProjectedFieldKey fieldKey, Percentile p, TemporalCoordinates tc) <I extends Indexable<I>>
Future<AggregationResponse>percentileByIndexedQueryAsync(IndexedQuery<I> iq, ProjectedFieldKey fieldKey, Percentile p, TemporalCoordinates tc) <I extends Indexable<I>>
WrittenObject<I extends Indexable<I>>
Future<WriteAsyncResponse>putObjectAsync(I object, Vt vtFrom) <E extends Event<E>>
EreadEventAsync(EventId eventId, Fqn fqn, Tt tt) readEventForObject(Indexable<I> ixbl) readEventForObjectAsync(Indexable<I> ixbl) readLsqt()<I extends Indexable<I>>
ReadObjectreadObject(I ixbl, TemporalCoordinates tc) <I extends Indexable<I>>
Future<ReadObject>readObjectAsync(I ixbl, TemporalCoordinates tc) readObjects(I object, TemporalCoordinates tc) <I extends Indexable<I>>
Future<ReadAsyncResponse>readObjectsAsync(I object, TemporalCoordinates tc) readObjectsAtTt(I ixbl, Tt tt) <I extends Indexable<I>>
Future<ReadAsyncResponse>readObjectsAtTtAsync(I ixbl, Tt tt) readObjectsAtVt(I ixbl, TemporalCoordinates tc) <I extends Indexable<I>>
Future<ReadAsyncResponse>readObjectsAtVtAsync(I ixbl, TemporalCoordinates tc) readObjectsByEvent(E e) readObjectsByFqn(Fqn fqn, Tt maxSeenTtFrom, TimesliceId maxSeenTimesliceId, Tt maxTtFrom, BatchSize batchSize) <I extends Indexable<I>>
Future<ReadAsyncResponse>readPoint(ObjectId objectId, TemporalCoordinates tc) readPointAsync(ObjectId objectId, TemporalCoordinates tc) <I extends Indexable<I>>
WrittenObjectreindexObject(I ixbl) <I extends Indexable<I>>
Future<WriteAsyncResponse>reindexObjectAsync(I ixbl) reinstateAsync(ObjectId objectId, Tt lastRead, Vt vtFrom) <I extends Indexable<I>>
WrittenObjectreinstateObject(I object, Vt vtFrom) <I extends Indexable<I>>
Future<WriteAsyncResponse>reinstateObjectAsync(I object, Vt vtFrom) voidstart()<I extends Indexable<I>>
AggregationResponsestdevByIndexedQuery(IndexedQuery<I> iq, ProjectedFieldKey fieldKey, TemporalCoordinates tc) <I extends Indexable<I>>
Future<AggregationResponse>stdevByIndexedQueryAsync(IndexedQuery<I> iq, ProjectedFieldKey fieldKey, TemporalCoordinates tc) voidstop()<I extends Indexable<I>>
voidsubscribeToIndexedQuery(IndexedQuery<I> iq, Function<SubscribeResponse, Boolean> cback) voidsubscribeToObjectId(ObjectId oid, Function<SubscribeResponse, Boolean> cback) <I extends Indexable<I>>
AggregationResponsesumByIndexedQuery(IndexedQuery<I> iq, ProjectedFieldKey fieldKey, TemporalCoordinates tc) <I extends Indexable<I>>
Future<AggregationResponse>sumByIndexedQueryAsync(IndexedQuery<I> iq, ProjectedFieldKey fieldKey, TemporalCoordinates tc) <I extends Indexable<I>>
AggregationResponsevarByIndexedQuery(IndexedQuery<I> iq, ProjectedFieldKey fieldKey, TemporalCoordinates tc) <I extends Indexable<I>>
Future<AggregationResponse>varByIndexedQueryAsync(IndexedQuery<I> iq, ProjectedFieldKey fieldKey, TemporalCoordinates tc)  
- 
Constructor Details
- 
ClientImpl
 
 - 
 - 
Method Details
- 
getReadQueueCap
public long getReadQueueCap()- Specified by:
 getReadQueueCapin interfaceClient
 - 
getWriteQueueCap
public long getWriteQueueCap()- Specified by:
 getWriteQueueCapin interfaceClient
 - 
getLsqt
 - 
getMetrics
- Specified by:
 getMetricsin interfaceClient
 - 
readLsqt
 - 
start
public void start() - 
stop
public void stop() - 
checkReader
public boolean checkReader()- Specified by:
 checkReaderin interfaceClient
 - 
checkWriter
public boolean checkWriter()- Specified by:
 checkWriterin interfaceClient
 - 
commitTxn
 - 
commitTxnAsync
- Specified by:
 commitTxnAsyncin interfaceClient
 - 
readEventForObject
- Specified by:
 readEventForObjectin interfaceClient
 - 
readEventForObjectAsync
public <I extends Indexable<I>,E extends Event<E>> Future<E> readEventForObjectAsync(Indexable<I> ixbl) - Specified by:
 readEventForObjectAsyncin interfaceClient
 - 
readObjectsByEvent
- Specified by:
 readObjectsByEventin interfaceClient
 - 
readObjectsByEventAsync
- Specified by:
 readObjectsByEventAsyncin interfaceClient
 - 
readObjectsToIndexables
- Specified by:
 readObjectsToIndexablesin interfaceClient
 - 
buildAggregationResponse
public AggregationResponse buildAggregationResponse(ReadResponse.ReadCommandResponse r, boolean requireInteger)  - 
listLockedFqns
- Specified by:
 listLockedFqnsin interfaceClient
 - 
reindexObject
- Specified by:
 reindexObjectin interfaceClient
 - 
reindexObjectAsync
- Specified by:
 reindexObjectAsyncin interfaceClient
 - 
subscribeToIndexedQuery
public <I extends Indexable<I>> void subscribeToIndexedQuery(IndexedQuery<I> iq, Function<SubscribeResponse, Boolean> cback) - Specified by:
 subscribeToIndexedQueryin interfaceClient
 
 -