public final class IpcPublication extends java.lang.Object implements DriverManagedResource, Subscribable
Constructor and Description |
---|
IpcPublication(long registrationId,
long tag,
int sessionId,
int streamId,
org.agrona.concurrent.status.Position publisherPos,
org.agrona.concurrent.status.Position publisherLimit,
RawLog rawLog,
long unblockTimeoutNs,
long lingerTimeoutNs,
long nowNs,
SystemCounters systemCounters,
boolean isExclusive) |
Modifier and Type | Method and Description |
---|---|
void |
addSubscriber(org.agrona.concurrent.status.ReadablePosition subscriberPosition)
Add a subscriber identified by its position.
|
void |
close()
Close resources that are not external.
|
void |
decRef() |
boolean |
free()
Free external resources such as files.
|
boolean |
hasReachedEndOfLife()
Has resource reached end of its life and should be reclaimed?
|
void |
incRef() |
boolean |
isExclusive() |
int |
mtuLength() |
void |
onTimeEvent(long timeNs,
long timeMs,
DriverConductor conductor)
Inform resource of timeNs passing and pass it DriverConductor to inform of any state transitions.
|
int |
publisherLimitId() |
RawLog |
rawLog() |
long |
registrationId() |
void |
removeSubscriber(org.agrona.concurrent.status.ReadablePosition subscriberPosition)
Remove a subscriber identified by its position.
|
int |
sessionId() |
int |
streamId() |
long |
tag() |
int |
termBufferLength() |
public IpcPublication(long registrationId, long tag, int sessionId, int streamId, org.agrona.concurrent.status.Position publisherPos, org.agrona.concurrent.status.Position publisherLimit, RawLog rawLog, long unblockTimeoutNs, long lingerTimeoutNs, long nowNs, SystemCounters systemCounters, boolean isExclusive)
public int sessionId()
public int streamId()
public long registrationId()
public long tag()
public boolean isExclusive()
public RawLog rawLog()
public int publisherLimitId()
public int termBufferLength()
public int mtuLength()
public boolean free()
DriverManagedResource
free
in interface DriverManagedResource
public void close()
DriverManagedResource
close
in interface DriverManagedResource
public void addSubscriber(org.agrona.concurrent.status.ReadablePosition subscriberPosition)
Subscribable
addSubscriber
in interface Subscribable
subscriberPosition
- for tracking and identifying the subscriber.public void removeSubscriber(org.agrona.concurrent.status.ReadablePosition subscriberPosition)
Subscribable
Note: The Subscribable
is responsible for calling ReadablePosition.close()
on
removed positions.
removeSubscriber
in interface Subscribable
subscriberPosition
- to be identified by.public void onTimeEvent(long timeNs, long timeMs, DriverConductor conductor)
DriverManagedResource
onTimeEvent
in interface DriverManagedResource
timeNs
- now in nanosecondstimeMs
- now in milliseconds for epochconductor
- to inform of any state transitionspublic boolean hasReachedEndOfLife()
DriverManagedResource
hasReachedEndOfLife
in interface DriverManagedResource
public void incRef()
public void decRef()
Copyright © 2014-2018 Real Logic Ltd. All Rights Reserved.