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 the
LiveScoutDispatcher to store un-processed live-scout related messages.
Each LiveScoutDispatcherContainer represents a single message.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.lmax.disruptor.EventFactory<LiveScoutDispatcherContainer> AEventFactoryused to initialize emptyLiveScoutDispatcherContainerinstances. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Clears the content of the currentDispatcherContainer.voidcopy(LiveScoutDispatcherContainer other) Copies the content of the passedDispatcherContainerto the current one.Gets theLiveScoutEntityBaserepresenting the message held be the currentLiveScoutDispatcherContainerbooleanisValid()Checks if is container valid
-
Field Details
-
CONTAINER_FACTORY
AEventFactoryused to initialize emptyLiveScoutDispatcherContainerinstances.
-
-
Constructor Details
-
LiveScoutDispatcherContainer
Initializes a new instance of theLiveScoutDispatcherContainerclass.- Parameters:
entity- TheLiveScoutEntityBaseinstance to be held by the constructed container.- Throws:
IllegalArgumentException- theentityis a null reference.
-
-
Method Details
-
isValid
public boolean isValid()Checks if is container valid- Specified by:
isValidin interfaceDispatcherContainer<LiveScoutDispatcherContainer>- Returns:
- true if valid.
-
getEntity
Gets theLiveScoutEntityBaserepresenting the message held be the currentLiveScoutDispatcherContainer- Returns:
- the
LiveScoutEntityBaserepresenting the message held be the currentLiveScoutDispatcherContainer
-
copy
Copies the content of the passedDispatcherContainerto the current one.- Specified by:
copyin interfaceDispatcherContainer<LiveScoutDispatcherContainer>- Parameters:
other- TheDispatcherContainerwhose content will be copied to the current one.- Throws:
IllegalArgumentException- theotheris a null reference.
-
clear
public void clear()Clears the content of the currentDispatcherContainer.- Specified by:
clearin interfaceDispatcherContainer<LiveScoutDispatcherContainer>
-