public interface TablePublisher extends Closeable
Table.getTablePublisher(String)
where a publisher name is specified. Tuples
published will include the name of the publisher and the specified sequenceNumber for tracking and recoverability
purposes.Modifier and Type | Field and Description |
---|---|
static int |
PUBLISH_BUFFER_SIZE_DEFAULT
The default number of tuples buffered on the client side before publishing to the server.
|
static long |
PUBLISH_INTERVAL_DEFAULT
The default time between buffer flushes when the buffer does not fill up completely.
|
static TimeUnit |
PUBLISH_INTERVAL_TIME_UNIT_DEFAULT
Default publish interval units:
TimeUnit.MILLISECONDS . |
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes client and server resources held by the publisher
|
void |
flush()
Force the currently buffered tuples to be sent to the server.
|
PublisherListener |
getPublisherListener()
Gets the
PublisherListener associated with this
TablePublisher |
Schema |
getSchema()
Schema needed to create tuples for the publish method.
|
PublisherStatus |
getStatus()
Gets the latest
PublisherStatus for the current
TablePublisher |
void |
publish(Boolean CQSDelete,
Tuple tuple)
Publish a tuple without regard for recovering since no sequence number is specified.
|
void |
publish(long sequenceNumber,
Boolean CQSDelete,
Tuple tuple)
Publish a tuple with a sequenceNumber.
|
void |
publish(long sequenceNumber,
Tuple tuple)
Publish a tuple with a sequenceNumber.
|
void |
publish(Tuple tuple)
Publish a tuple without regard for recovering since no sequence number is specified.
|
static final int PUBLISH_BUFFER_SIZE_DEFAULT
static final long PUBLISH_INTERVAL_DEFAULT
TablePublisher.PUBLISH_INTERVAL_TIME_UNIT_DEFAULT
units.static final TimeUnit PUBLISH_INTERVAL_TIME_UNIT_DEFAULT
TimeUnit.MILLISECONDS
.Schema getSchema()
void publish(long sequenceNumber, Tuple tuple) throws LiveViewException
sequenceNumber
- the identifier known to the publishertuple
- the tuple to publishLiveViewException
- if any server side exception occurs during publishingvoid publish(long sequenceNumber, Boolean CQSDelete, Tuple tuple) throws LiveViewException
sequenceNumber
- the identifier known to the publisherCQSDelete
- - true if you wish to delete the row defined by the primary key valuestuple
- the tuple to publish. If CQSDelete is true the row which matches the primary key values is removed.LiveViewException
- if any server side exception occurs during publishingvoid publish(Tuple tuple) throws LiveViewException
tuple
- the tuple to publishLiveViewException
- if any server side exception occurs during publishingvoid publish(Boolean CQSDelete, Tuple tuple) throws LiveViewException
CQSDelete
- true if you wish to delete the row defined by the primary key valuestuple
- the tuple to publish. If CQSDelete is true the row which matches the primary key values is removed.LiveViewException
- if any server side exception occurs during publishingPublisherStatus getStatus() throws LiveViewException
PublisherStatus
for the current
TablePublisher
PublisherStatus
to get the latest PublisherStatus
of
current TablePublisher
{@link
- LiveViewException}LiveViewException
PublisherListener getPublisherListener() throws LiveViewException
PublisherListener
associated with this
TablePublisher
PublisherListener
to receive PublisherStatusEvent
.
Returns null if there is no associated PublisherListener
.{@link
- LiveViewException}LiveViewException
void flush() throws LiveViewException
LiveViewException
void close()
close
in interface AutoCloseable
close
in interface Closeable
Copyright © 2015–2019 Cloud Software Group, Inc.. All rights reserved.