public class PublicationImage extends java.lang.Object implements LossHandler, DriverManagedResource, Subscribable
Modifier and Type | Field and Description |
---|---|
protected long |
cleanPosition |
protected ImageConnection[] |
imageConnections |
protected boolean |
isEndOfStream |
protected long |
lastPacketTimestampNs |
protected LossReport |
lossReport |
protected long |
p1 |
protected long |
p10 |
protected long |
p11 |
protected long |
p12 |
protected long |
p13 |
protected long |
p14 |
protected long |
p15 |
protected long |
p16 |
protected long |
p17 |
protected long |
p18 |
protected long |
p19 |
protected long |
p2 |
protected long |
p20 |
protected long |
p21 |
protected long |
p22 |
protected long |
p23 |
protected long |
p24 |
protected long |
p25 |
protected long |
p26 |
protected long |
p27 |
protected long |
p28 |
protected long |
p29 |
protected long |
p3 |
protected long |
p30 |
protected long |
p31 |
protected long |
p32 |
protected long |
p33 |
protected long |
p34 |
protected long |
p35 |
protected long |
p36 |
protected long |
p37 |
protected long |
p38 |
protected long |
p39 |
protected long |
p4 |
protected long |
p40 |
protected long |
p41 |
protected long |
p42 |
protected long |
p43 |
protected long |
p44 |
protected long |
p45 |
protected long |
p5 |
protected long |
p6 |
protected long |
p7 |
protected long |
p8 |
protected long |
p9 |
protected LossReport.ReportEntry |
reportEntry |
protected org.agrona.concurrent.status.ReadablePosition[] |
subscriberPositions |
Constructor and Description |
---|
PublicationImage(long correlationId,
long imageLivenessTimeoutNs,
ReceiveChannelEndpoint channelEndpoint,
int transportIndex,
java.net.InetSocketAddress controlAddress,
int sessionId,
int streamId,
int initialTermId,
int activeTermId,
int initialTermOffset,
RawLog rawLog,
FeedbackDelayGenerator lossFeedbackDelayGenerator,
org.agrona.concurrent.status.ReadablePosition[] subscriberPositions,
org.agrona.concurrent.status.Position hwmPosition,
org.agrona.concurrent.status.Position rebuildPosition,
org.agrona.concurrent.NanoClock nanoClock,
org.agrona.concurrent.NanoClock cachedNanoClock,
org.agrona.concurrent.EpochClock cachedEpochClock,
SystemCounters systemCounters,
java.net.InetSocketAddress sourceAddress,
CongestionControl congestionControl,
LossReport lossReport,
boolean isReliable) |
Modifier and Type | Method and Description |
---|---|
void |
addSubscriber(org.agrona.concurrent.status.ReadablePosition subscriberPosition)
Add a new subscriber to this image so their position can be tracked for flow control.
|
java.lang.String |
channel()
Get the string representation of the channel URI.
|
void |
close()
Close resources that are not external.
|
long |
correlationId() |
boolean |
free()
Free external resources such as files.
|
boolean |
hasReachedEndOfLife()
Has resource reached end of its life and should be reclaimed?
|
void |
onGapDetected(int termId,
int termOffset,
int length)
Called from the
LossDetector when gap is detected by the DriverConductor thread. |
void |
onTimeEvent(long timeNs,
long timesMs,
DriverConductor conductor)
Inform resource of timeNs passing and pass it DriverConductor to inform of any state transitions.
|
void |
removeSubscriber(org.agrona.concurrent.status.ReadablePosition subscriberPosition)
Remove a
ReadablePosition for a subscriber that has been removed so it is not tracked for flow control. |
int |
sessionId()
The session id of the channel from a publisher.
|
int |
streamId()
The stream id of this image within a channel.
|
protected long p31
protected long p32
protected long p33
protected long p34
protected long p35
protected long p36
protected long p37
protected long p38
protected long p39
protected long p40
protected long p41
protected long p42
protected long p43
protected long p44
protected long p45
protected boolean isEndOfStream
protected long lastPacketTimestampNs
protected ImageConnection[] imageConnections
protected long p16
protected long p17
protected long p18
protected long p19
protected long p20
protected long p21
protected long p22
protected long p23
protected long p24
protected long p25
protected long p26
protected long p27
protected long p28
protected long p29
protected long p30
protected long cleanPosition
protected org.agrona.concurrent.status.ReadablePosition[] subscriberPositions
protected LossReport lossReport
protected LossReport.ReportEntry reportEntry
protected long p1
protected long p2
protected long p3
protected long p4
protected long p5
protected long p6
protected long p7
protected long p8
protected long p9
protected long p10
protected long p11
protected long p12
protected long p13
protected long p14
protected long p15
public PublicationImage(long correlationId, long imageLivenessTimeoutNs, ReceiveChannelEndpoint channelEndpoint, int transportIndex, java.net.InetSocketAddress controlAddress, int sessionId, int streamId, int initialTermId, int activeTermId, int initialTermOffset, RawLog rawLog, FeedbackDelayGenerator lossFeedbackDelayGenerator, org.agrona.concurrent.status.ReadablePosition[] subscriberPositions, org.agrona.concurrent.status.Position hwmPosition, org.agrona.concurrent.status.Position rebuildPosition, org.agrona.concurrent.NanoClock nanoClock, org.agrona.concurrent.NanoClock cachedNanoClock, org.agrona.concurrent.EpochClock cachedEpochClock, SystemCounters systemCounters, java.net.InetSocketAddress sourceAddress, CongestionControl congestionControl, LossReport lossReport, boolean isReliable)
public boolean free()
DriverManagedResource
free
in interface DriverManagedResource
public void close()
close
in interface DriverManagedResource
public long correlationId()
public int sessionId()
public int streamId()
public java.lang.String channel()
public void removeSubscriber(org.agrona.concurrent.status.ReadablePosition subscriberPosition)
ReadablePosition
for a subscriber that has been removed so it is not tracked for flow control.removeSubscriber
in interface Subscribable
subscriberPosition
- for the subscriber that has been removed.public void addSubscriber(org.agrona.concurrent.status.ReadablePosition subscriberPosition)
addSubscriber
in interface Subscribable
subscriberPosition
- for the subscriber to be added.public void onGapDetected(int termId, int termOffset, int length)
LossDetector
when gap is detected by the DriverConductor
thread.onGapDetected
in interface LossHandler
termId
- for the gaptermOffset
- for the beginning of the gaplength
- of the gapLossHandler
public void onTimeEvent(long timeNs, long timesMs, DriverConductor conductor)
DriverManagedResource
onTimeEvent
in interface DriverManagedResource
timeNs
- now in nanosecondstimesMs
- now in milliseconds for epochconductor
- to inform of any state transitionspublic boolean hasReachedEndOfLife()
DriverManagedResource
hasReachedEndOfLife
in interface DriverManagedResource
Copyright © 2014-2018 Real Logic Ltd. All Rights Reserved.