@Stable class PubSubWriter extends AbstractOnlineAttributeWriter implements OnlineAttributeWriter
OnlineAttributeWriter for Google PubSub.cz.o2.proxima.storage.AbstractStorage.SerializableAbstractStorageOnlineAttributeWriter.Factory<T extends OnlineAttributeWriter>AttributeWriterBase.Type| Modifier and Type | Field and Description |
|---|---|
private PubSubAccessor |
accessor |
private boolean |
closed |
private Context |
context |
private java.util.concurrent.ExecutorService |
executor |
private java.lang.Object |
flightLock |
private java.util.concurrent.atomic.AtomicInteger |
inflight |
private boolean |
initialized |
private com.google.cloud.pubsub.v1.Publisher |
publisher |
| Constructor and Description |
|---|
PubSubWriter(PubSubAccessor accessor,
Context context) |
| Modifier and Type | Method and Description |
|---|---|
OnlineAttributeWriter.Factory<?> |
asFactory() |
void |
close() |
(package private) void |
initialize() |
(package private) com.google.cloud.pubsub.v1.Publisher |
newPublisher(java.lang.String project,
java.lang.String topic) |
void |
write(cz.o2.proxima.storage.StreamElement data,
CommitCallback statusCallback) |
equals, getEntityDescriptor, getUri, hashCodeclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitgetType, isTransactional, rollback, transactionalbulk, getUri, onlineprivate final PubSubAccessor accessor
private final Context context
private final java.util.concurrent.atomic.AtomicInteger inflight
private final java.lang.Object flightLock
private volatile boolean closed
private transient boolean initialized
private transient com.google.cloud.pubsub.v1.Publisher publisher
private transient java.util.concurrent.ExecutorService executor
PubSubWriter(PubSubAccessor accessor, Context context)
void initialize()
com.google.cloud.pubsub.v1.Publisher newPublisher(java.lang.String project,
java.lang.String topic)
throws java.io.IOException
java.io.IOExceptionpublic void write(cz.o2.proxima.storage.StreamElement data,
CommitCallback statusCallback)
write in interface OnlineAttributeWriterpublic OnlineAttributeWriter.Factory<?> asFactory()
asFactory in interface AttributeWriterBaseasFactory in interface OnlineAttributeWriterpublic void close()
close in interface AttributeWriterBaseclose in interface java.lang.AutoCloseableclose in class AbstractOnlineAttributeWriterCopyright © 2017–2022. All rights reserved.