Class LiveScoutDispatcherContainer
- java.lang.Object
-
- com.sportradar.livedata.sdk.dispatch.livescout.LiveScoutDispatcherContainer
-
- All Implemented Interfaces:
DispatcherContainer<LiveScoutDispatcherContainer>
public class LiveScoutDispatcherContainer extends Object implements DispatcherContainer<LiveScoutDispatcherContainer>
A container used by theLiveScoutDispatcher
to store un-processed live-scout related messages. EachLiveScoutDispatcherContainer
represents a single message.
-
-
Field Summary
Fields Modifier and Type Field Description static com.lmax.disruptor.EventFactory<LiveScoutDispatcherContainer>
CONTAINER_FACTORY
AEventFactory
used to initialize emptyLiveScoutDispatcherContainer
instances.
-
Constructor Summary
Constructors Constructor Description LiveScoutDispatcherContainer(LiveScoutEntityBase entity)
Initializes a new instance of theLiveScoutDispatcherContainer
class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear()
Clears the content of the currentDispatcherContainer
.void
copy(LiveScoutDispatcherContainer other)
Copies the content of the passedDispatcherContainer
to the current one.LiveScoutEntityBase
getEntity()
Gets theLiveScoutEntityBase
representing the message held be the currentLiveScoutDispatcherContainer
boolean
isValid()
Checks if is container valid
-
-
-
Field Detail
-
CONTAINER_FACTORY
public static final com.lmax.disruptor.EventFactory<LiveScoutDispatcherContainer> CONTAINER_FACTORY
AEventFactory
used to initialize emptyLiveScoutDispatcherContainer
instances.
-
-
Constructor Detail
-
LiveScoutDispatcherContainer
public LiveScoutDispatcherContainer(LiveScoutEntityBase entity)
Initializes a new instance of theLiveScoutDispatcherContainer
class.- Parameters:
entity
- TheLiveScoutEntityBase
instance to be held by the constructed container.- Throws:
IllegalArgumentException
- theentity
is a null reference.
-
-
Method Detail
-
isValid
public boolean isValid()
Checks if is container valid- Specified by:
isValid
in interfaceDispatcherContainer<LiveScoutDispatcherContainer>
- Returns:
- true if valid.
-
getEntity
public LiveScoutEntityBase getEntity()
Gets theLiveScoutEntityBase
representing the message held be the currentLiveScoutDispatcherContainer
- Returns:
- the
LiveScoutEntityBase
representing the message held be the currentLiveScoutDispatcherContainer
-
copy
public void copy(LiveScoutDispatcherContainer other)
Copies the content of the passedDispatcherContainer
to the current one.- Specified by:
copy
in interfaceDispatcherContainer<LiveScoutDispatcherContainer>
- Parameters:
other
- TheDispatcherContainer
whose content will be copied to the current one.- Throws:
IllegalArgumentException
- theother
is a null reference.
-
clear
public void clear()
Clears the content of the currentDispatcherContainer
.- Specified by:
clear
in interfaceDispatcherContainer<LiveScoutDispatcherContainer>
-
-