public class TimelineQueueImpl extends Object implements TimelineQueue
构造器和说明 |
---|
TimelineQueueImpl(SyncClientInterface client,
TableStoreWriter writer,
TimelineSchema schema,
TimelineIdentifier identifier) |
限定符和类型 | 方法和说明 |
---|---|
Future<TimelineEntry> |
batchStore(long sequenceId,
TimelineMessage message)
Batch store message asynchronously with manually set sequence id.
|
Future<TimelineEntry> |
batchStore(long sequenceId,
TimelineMessage message,
TimelineCallback callback)
Store message asynchronously with manually set sequence id by writer.
|
Future<TimelineEntry> |
batchStore(TimelineMessage message)
Batch store message to specified timeline queue with auto-generated sequence id.
|
Future<TimelineEntry> |
batchStore(TimelineMessage message,
TimelineCallback callback)
Store message asynchronously with autogenerated sequence id by writer.
|
void |
close() |
void |
delete(long sequenceId)
Delete timeline entry by specified sequence id.
|
void |
flush()
Flush all the messages in buffer, wait until finish writing.
|
TimelineEntry |
get(long sequenceId)
Get timeline entry by sequence id.
|
TimelineIdentifier |
getIdentifier()
The specified identifier of single timeline queue.
|
long |
getLatestSequenceId()
Get the latest sequence id of specified identifier.
|
TimelineEntry |
getLatestTimelineEntry()
Get the latest timeline entry of specified identifier.
|
Iterator<TimelineEntry> |
scan(ScanParameter parameter)
Scan a specified range of timeline entries by scan parameter.
|
TimelineEntry |
store(long sequenceId,
TimelineMessage message)
Store message to specified timeline queue whose sequence id is set manually.
|
TimelineEntry |
store(TimelineMessage message)
Store message into specified timeline queue with auto-generated sequence id.
|
Future<TimelineEntry> |
storeAsync(long sequenceId,
TimelineMessage message,
TimelineCallback callback)
Store message asynchronously with manually set sequence id.
|
Future<TimelineEntry> |
storeAsync(TimelineMessage message,
TimelineCallback callback)
Store message asynchronously with auto-generated sequence id.
|
TimelineEntry |
update(long sequenceId,
TimelineMessage message)
Update message with new content by sequence id.
|
Future<TimelineEntry> |
updateAsync(long sequenceId,
TimelineMessage message,
TimelineCallback callback)
Update message asynchronously with new content by sequence id.
|
public TimelineQueueImpl(SyncClientInterface client, TableStoreWriter writer, TimelineSchema schema, TimelineIdentifier identifier)
public TimelineIdentifier getIdentifier()
TimelineQueue
getIdentifier
在接口中 TimelineQueue
public TimelineEntry store(TimelineMessage message)
TimelineQueue
store
在接口中 TimelineQueue
message
- The content of the message to store.public TimelineEntry store(long sequenceId, TimelineMessage message)
TimelineQueue
store
在接口中 TimelineQueue
sequenceId
- The sequence id of the timeline, which should be unique and incremental.message
- The content of the message to store.public Future<TimelineEntry> storeAsync(TimelineMessage message, TimelineCallback callback)
TimelineQueue
storeAsync
在接口中 TimelineQueue
message
- The content of the message to store.callback
- The timeline callback, which deal with response.public Future<TimelineEntry> storeAsync(long sequenceId, TimelineMessage message, TimelineCallback callback)
TimelineQueue
storeAsync
在接口中 TimelineQueue
sequenceId
- The sequence id of the timeline, which should be unique and incremental.message
- The content of the message to store.callback
- The timeline callback, which deal with response.public Future<TimelineEntry> batchStore(TimelineMessage message)
TimelineQueue
batchStore
在接口中 TimelineQueue
message
- The content of the message to store.public Future<TimelineEntry> batchStore(long sequenceId, TimelineMessage message)
TimelineQueue
batchStore
在接口中 TimelineQueue
sequenceId
- The sequence id of the timeline, which should be unique and incremental.message
- The content of the message to store.public Future<TimelineEntry> batchStore(TimelineMessage message, TimelineCallback callback)
TimelineQueue
batchStore
在接口中 TimelineQueue
message
- The content of the message to store.callback
- Timeline callback, which deal with single message response.public Future<TimelineEntry> batchStore(long sequenceId, TimelineMessage message, TimelineCallback callback)
TimelineQueue
batchStore
在接口中 TimelineQueue
sequenceId
- The sequence id of the timeline, which should be unique and incremental.message
- The content of the message to store.callback
- Timeline callback, which deal with single message response.public TimelineEntry update(long sequenceId, TimelineMessage message)
TimelineQueue
update
在接口中 TimelineQueue
sequenceId
- The sequence id of the timeline to update.message
- New content of the message to update.public Future<TimelineEntry> updateAsync(long sequenceId, TimelineMessage message, TimelineCallback callback)
TimelineQueue
updateAsync
在接口中 TimelineQueue
sequenceId
- The sequence id of the timeline to update.message
- New content of the message to update.callback
- Timeline callback to deal with response.public TimelineEntry get(long sequenceId)
TimelineQueue
get
在接口中 TimelineQueue
sequenceId
- The sequence id of the timeline to get.public void delete(long sequenceId)
TimelineQueue
delete
在接口中 TimelineQueue
sequenceId
- The sequence id of the timeline to delete.public Iterator<TimelineEntry> scan(ScanParameter parameter)
TimelineQueue
scan
在接口中 TimelineQueue
parameter
- The parameter of scan range.public long getLatestSequenceId()
TimelineQueue
getLatestSequenceId
在接口中 TimelineQueue
public TimelineEntry getLatestTimelineEntry()
TimelineQueue
getLatestTimelineEntry
在接口中 TimelineQueue
public void flush()
TimelineQueue
flush
在接口中 TimelineQueue
public void close()
close
在接口中 TimelineQueue
Copyright © 2019. All Rights Reserved.