public final class IpcPublication extends Object implements DriverManagedResource, Subscribable
| Modifier and Type | Method and Description |
|---|---|
void |
addSubscriber(SubscriptionLink subscriptionLink,
ReadablePosition subscriberPosition)
Add a subscriber and its position used for tracking consumption.
|
String |
channel()
Channel URI string for this publication.
|
void |
close()
Close resources that are not external.
|
boolean |
free()
Free external resources such as files.
|
boolean |
hasReachedEndOfLife()
Has resource reached end of its life and should be reclaimed?
|
void |
onTimeEvent(long timeNs,
long timeMs,
DriverConductor conductor)
Inform resource of timeNs passing and pass it DriverConductor to inform of any state transitions.
|
void |
removeSubscriber(SubscriptionLink subscriptionLink,
ReadablePosition subscriberPosition)
Remove a subscriber and its position used for tracking consumption.
|
int |
sessionId()
Session id allocated to this stream.
|
int |
streamId()
Stream id within the channel.
|
public String channel()
public int sessionId()
public int streamId()
public boolean free()
DriverManagedResourcefree in interface DriverManagedResourcepublic void close()
DriverManagedResourceclose in interface DriverManagedResourceclose in interface AutoCloseablepublic void addSubscriber(SubscriptionLink subscriptionLink, ReadablePosition subscriberPosition)
SubscribableaddSubscriber in interface SubscribablesubscriptionLink - for identifying the subscriber.subscriberPosition - for tracking the subscriber.public void removeSubscriber(SubscriptionLink subscriptionLink, ReadablePosition subscriberPosition)
Subscribable
Note: The Subscribable is responsible for calling ReadablePosition.close() on
removed positions.
removeSubscriber in interface SubscribablesubscriptionLink - for identifying the subscriber.subscriberPosition - for tracking the subscriber.public void onTimeEvent(long timeNs,
long timeMs,
DriverConductor conductor)
DriverManagedResourceonTimeEvent in interface DriverManagedResourcetimeNs - now in nanoseconds.timeMs - now in milliseconds for epoch.conductor - to inform of any state transitions.public boolean hasReachedEndOfLife()
DriverManagedResourcehasReachedEndOfLife in interface DriverManagedResourceCopyright © 2014-2020 Real Logic Limited. All Rights Reserved.