public class DrivelineClient extends java.lang.Object implements TransportDelegate
| Modifier and Type | Class and Description |
|---|---|
static class |
DrivelineClient.Builder |
| Modifier and Type | Method and Description |
|---|---|
void |
append(java.lang.String stream,
byte[] record) |
void |
append(java.lang.String stream,
byte[] record,
AppendOptions options) |
void |
append(java.lang.String stream,
java.util.Collection<byte[]> records) |
void |
append(java.lang.String stream,
java.util.Collection<byte[]> records,
AppendOptions options) |
static DrivelineClient.Builder |
builder() |
void |
cancel(Query query) |
void |
cancel(Query query,
CancelOptions options) |
void |
closeStream(Stream stream) |
Query |
continuousQuery(java.lang.String dql,
QueryOptions options,
RecordHandler handler) |
Query |
continuousQuery(java.lang.String dql,
RecordHandler handler) |
java.lang.Iterable<java.lang.String> |
listKeys(java.lang.String keyPattern) |
java.lang.Iterable<java.lang.String> |
listKeys(java.lang.String keyPattern,
ListOptions options) |
java.lang.Iterable<java.lang.String> |
listStreams(java.lang.String streamPattern) |
java.lang.Iterable<java.lang.String> |
listStreams(java.lang.String streamPattern,
ListOptions options) |
java.util.concurrent.CompletableFuture<Record> |
load(java.lang.String key) |
java.util.concurrent.CompletableFuture<Record> |
load(java.lang.String key,
LoadOptions options) |
void |
onConnect() |
void |
onDisconnect() |
void |
onError(java.lang.String error) |
void |
onMessage(byte[] message,
int offset,
int length) |
void |
onReconnect() |
Stream |
openStream(java.lang.String stream) |
Query |
query(java.lang.String dql,
QueryOptions options,
RecordHandler handler) |
Query |
query(java.lang.String dql,
RecordHandler handler) |
void |
remove(java.lang.String key) |
void |
removeMatches(java.lang.String keyPattern) |
void |
start() |
void |
start(TransportConfig config) |
void |
stop() |
void |
store(java.lang.String keyName,
byte[] record) |
void |
store(java.lang.String keyName,
byte[] record,
StoreOptions options) |
java.util.concurrent.CompletableFuture<java.lang.Void> |
sync() |
void |
truncate(java.lang.String stream) |
public void start()
throws DrivelineException
DrivelineExceptionpublic void start(TransportConfig config) throws DrivelineException
DrivelineExceptionpublic void stop()
throws DrivelineException
DrivelineExceptionpublic Query continuousQuery(java.lang.String dql, RecordHandler handler) throws DrivelineException
DrivelineExceptionpublic Query continuousQuery(java.lang.String dql, QueryOptions options, RecordHandler handler) throws DrivelineException
DrivelineExceptionpublic Query query(java.lang.String dql, RecordHandler handler) throws DrivelineException
DrivelineExceptionpublic Query query(java.lang.String dql, QueryOptions options, RecordHandler handler) throws DrivelineException
DrivelineExceptionpublic void cancel(Query query) throws DrivelineException
DrivelineExceptionpublic void cancel(Query query, CancelOptions options) throws DrivelineException
DrivelineExceptionpublic Stream openStream(java.lang.String stream) throws DrivelineException
DrivelineExceptionpublic void closeStream(Stream stream)
public void append(java.lang.String stream,
byte[] record)
throws DrivelineException
DrivelineExceptionpublic void append(java.lang.String stream,
byte[] record,
AppendOptions options)
throws DrivelineException
DrivelineExceptionpublic void append(java.lang.String stream,
java.util.Collection<byte[]> records)
throws DrivelineException
DrivelineExceptionpublic void append(java.lang.String stream,
java.util.Collection<byte[]> records,
AppendOptions options)
throws DrivelineException
DrivelineExceptionpublic void truncate(java.lang.String stream)
throws DrivelineException
DrivelineExceptionpublic java.lang.Iterable<java.lang.String> listStreams(java.lang.String streamPattern)
throws DrivelineException
DrivelineExceptionpublic java.lang.Iterable<java.lang.String> listStreams(java.lang.String streamPattern,
ListOptions options)
throws DrivelineException
DrivelineExceptionpublic void store(java.lang.String keyName,
byte[] record)
throws DrivelineException
DrivelineExceptionpublic void store(java.lang.String keyName,
byte[] record,
StoreOptions options)
throws DrivelineException
DrivelineExceptionpublic java.util.concurrent.CompletableFuture<Record> load(java.lang.String key) throws DrivelineException
DrivelineExceptionpublic java.util.concurrent.CompletableFuture<Record> load(java.lang.String key, LoadOptions options) throws DrivelineException
DrivelineExceptionpublic void remove(java.lang.String key)
throws DrivelineException
DrivelineExceptionpublic void removeMatches(java.lang.String keyPattern)
throws DrivelineException
DrivelineExceptionpublic java.lang.Iterable<java.lang.String> listKeys(java.lang.String keyPattern)
throws DrivelineException
DrivelineExceptionpublic java.lang.Iterable<java.lang.String> listKeys(java.lang.String keyPattern,
ListOptions options)
throws DrivelineException
DrivelineExceptionpublic java.util.concurrent.CompletableFuture<java.lang.Void> sync()
throws DrivelineException
DrivelineExceptionpublic void onConnect()
onConnect in interface TransportDelegatepublic void onReconnect()
onReconnect in interface TransportDelegatepublic void onDisconnect()
onDisconnect in interface TransportDelegatepublic void onError(java.lang.String error)
onError in interface TransportDelegatepublic void onMessage(byte[] message,
int offset,
int length)
onMessage in interface TransportDelegatepublic static DrivelineClient.Builder builder()