Package deltix.data.stream
Class MessageSourceMultiplexerFixed<T extends deltix.data.stream.TimeStampedMessage>
- java.lang.Object
-
- deltix.data.stream.MessageSourceMultiplexerFixed<T>
-
@ParametersAreNonnullByDefault public final class MessageSourceMultiplexerFixed<T extends deltix.data.stream.TimeStampedMessage> extends java.lang.Object
Alternative implementation ofMessageSourceMultiplexer
that is expected to provide better performance but has a set of limitations:- MAIN: it's impossible to change subscription on the fly
- no realTimeNotification option
- allowLateOutOfOrder option is static (however this can be changed in cost of minor penalty to performance)
-
-
Field Summary
Fields Modifier and Type Field Description protected T
currentMessage
protected deltix.data.stream.MessageSource<T>
currentSource
-
Constructor Summary
Constructors Constructor Description MessageSourceMultiplexerFixed(MessageSourceMultiplexer.ExceptionHandler xhandler, java.util.List<deltix.data.stream.MessageSource<T>> messageSources, boolean ascending, long currentTime, java.lang.Object lock)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addEmptySource(deltix.data.stream.MessageSource<T> feed)
void
close()
protected void
closeFeed(deltix.data.stream.MessageSource<T> feed)
long
getCurrentTime()
protected boolean
handleException(deltix.data.stream.MessageSource<T> feed, java.lang.RuntimeException rtx)
Returns true, if feed is closed.protected deltix.util.concurrent.NextResult
moveNext(deltix.data.stream.MessageSource<T> feed, boolean addEmpty)
boolean
next()
void
setAvailabilityListener(java.lang.Runnable lnr)
deltix.data.stream.MessageSource<T>
syncGetCurrentSource()
T
syncGetMessage()
boolean
syncIsAtEnd()
boolean
syncIsClosed()
boolean
syncNext()
-
-
-
Constructor Detail
-
MessageSourceMultiplexerFixed
public MessageSourceMultiplexerFixed(MessageSourceMultiplexer.ExceptionHandler xhandler, java.util.List<deltix.data.stream.MessageSource<T>> messageSources, boolean ascending, long currentTime, java.lang.Object lock)
-
-
Method Detail
-
closeFeed
protected final void closeFeed(deltix.data.stream.MessageSource<T> feed)
-
addEmptySource
protected void addEmptySource(deltix.data.stream.MessageSource<T> feed)
-
handleException
protected final boolean handleException(deltix.data.stream.MessageSource<T> feed, java.lang.RuntimeException rtx)
Returns true, if feed is closed.- Parameters:
feed
-rtx
-- Returns:
- true, if feed is closed
-
moveNext
protected deltix.util.concurrent.NextResult moveNext(deltix.data.stream.MessageSource<T> feed, boolean addEmpty)
-
next
public boolean next()
-
syncNext
public boolean syncNext()
-
setAvailabilityListener
public void setAvailabilityListener(@Nullable java.lang.Runnable lnr)
-
getCurrentTime
public long getCurrentTime()
-
syncGetMessage
public T syncGetMessage()
-
syncGetCurrentSource
public deltix.data.stream.MessageSource<T> syncGetCurrentSource()
-
syncIsAtEnd
public boolean syncIsAtEnd()
-
syncIsClosed
public boolean syncIsClosed()
-
close
public void close()
-
-