public final class IpcPublication extends Object implements DriverManagedResource, Subscribable
| Modifier and Type | Method and Description |
|---|---|
void |
addSubscriber(SubscriptionLink subscriptionLink,
ReadablePosition subscriberPosition,
long nowNs)
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.
|
long |
subscribableRegistrationId()
Registration ID that is in use by the subscribable.
|
public String channel()
public int sessionId()
public int streamId()
public long subscribableRegistrationId()
subscribableRegistrationId in interface Subscribablepublic boolean free()
free in interface DriverManagedResourcepublic void close()
DriverManagedResource.free(). That will
need to be called separately at the appropriate time.close in interface DriverManagedResourcepublic void addSubscriber(SubscriptionLink subscriptionLink, ReadablePosition subscriberPosition, long nowNs)
addSubscriber in interface SubscribablesubscriptionLink - for identifying the subscriber.subscriberPosition - for tracking the subscriber.nowNs - for the current time.public void removeSubscriber(SubscriptionLink subscriptionLink, ReadablePosition subscriberPosition)
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)
onTimeEvent in interface DriverManagedResourcetimeNs - now in nanoseconds.timeMs - now in milliseconds for epoch.conductor - to inform of any state transitions.public boolean hasReachedEndOfLife()
hasReachedEndOfLife in interface DriverManagedResourceCopyright © 2014-2023 Real Logic Limited. All Rights Reserved.