public abstract class SubscriptionLink extends java.lang.Object implements DriverManagedResource
Modifier and Type | Field and Description |
---|---|
protected AeronClient |
aeronClient |
protected java.lang.String |
channel |
protected boolean |
hasSessionId |
protected boolean |
isSparse |
protected java.util.Map<Subscribable,org.agrona.concurrent.status.ReadablePosition> |
positionBySubscribableMap |
protected boolean |
reachedEndOfLife |
protected long |
registrationId |
protected int |
sessionId |
protected int |
streamId |
Modifier | Constructor and Description |
---|---|
protected |
SubscriptionLink(long registrationId,
int streamId,
java.lang.String channel,
AeronClient aeronClient,
io.aeron.driver.SubscriptionParams params) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
channel() |
ReceiveChannelEndpoint |
channelEndpoint() |
void |
close()
Close resources that are not external.
|
boolean |
hasReachedEndOfLife()
Has resource reached end of its life and should be reclaimed?
|
boolean |
hasSessionId() |
boolean |
isLinked(Subscribable subscribable) |
boolean |
isReliable() |
boolean |
isSparse() |
boolean |
isWildcardOrSessionIdMatch(int sessionId) |
void |
link(Subscribable subscribable,
org.agrona.concurrent.status.ReadablePosition position) |
boolean |
matches(IpcPublication publication) |
boolean |
matches(NetworkPublication publication) |
boolean |
matches(PublicationImage image) |
boolean |
matches(ReceiveChannelEndpoint channelEndpoint,
int streamId,
int sessionId) |
boolean |
matches(ReceiveChannelEndpoint channelEndpoint,
int streamId,
io.aeron.driver.SubscriptionParams params) |
void |
onTimeEvent(long timeNs,
long timeMs,
DriverConductor conductor)
Inform resource of timeNs passing and pass it DriverConductor to inform of any state transitions.
|
long |
registrationId() |
int |
sessionId() |
int |
streamId() |
void |
unlink(Subscribable subscribable) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
free
protected final long registrationId
protected final int streamId
protected final int sessionId
protected final boolean hasSessionId
protected final boolean isSparse
protected final java.lang.String channel
protected final AeronClient aeronClient
protected final java.util.Map<Subscribable,org.agrona.concurrent.status.ReadablePosition> positionBySubscribableMap
protected boolean reachedEndOfLife
protected SubscriptionLink(long registrationId, int streamId, java.lang.String channel, AeronClient aeronClient, io.aeron.driver.SubscriptionParams params)
public long registrationId()
public int streamId()
public int sessionId()
public java.lang.String channel()
public ReceiveChannelEndpoint channelEndpoint()
public boolean isReliable()
public boolean isSparse()
public boolean hasSessionId()
public boolean matches(NetworkPublication publication)
public boolean matches(PublicationImage image)
public boolean matches(IpcPublication publication)
public boolean matches(ReceiveChannelEndpoint channelEndpoint, int streamId, io.aeron.driver.SubscriptionParams params)
public boolean matches(ReceiveChannelEndpoint channelEndpoint, int streamId, int sessionId)
public boolean isLinked(Subscribable subscribable)
public void link(Subscribable subscribable, org.agrona.concurrent.status.ReadablePosition position)
public void unlink(Subscribable subscribable)
public void close()
DriverManagedResource
close
in interface DriverManagedResource
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 boolean isWildcardOrSessionIdMatch(int sessionId)
Copyright © 2014-2018 Real Logic Ltd. All Rights Reserved.