Class SlidingWindowChannel
java.lang.Object
org.palladiosimulator.indirections.scheduler.AbstractSimDataChannelResource
org.palladiosimulator.indirections.scheduler.implementations.generic.SlidingWindowChannel
- All Implemented Interfaces:
IDataChannelResource
- Direct Known Subclasses:
ConfigurableSlidingWindowChannel
-
Field Summary
Fields inherited from class org.palladiosimulator.indirections.scheduler.AbstractSimDataChannelResource
afterAcceptingAgeCalculator, assemblyContext, beforeProvidingAgeCalculator, dataChannel, dataChannelResourceRegistry, discardedAgeCalculator, id, mainContext, model, name, numberOfDiscardedIncomingElementsCalculator, numberOfDiscardedOutgoingElementsCalculator, numberOfStoredIncomingElementsCalculator, numberOfStoredOutgoingElementsCalculator, processesWaitingToGet, processesWaitingToPut, resourceTableManager, simulatedThreadComponentFactory, waitingToGetTimeCalculator, waitingToPutTimeCalculator
-
Constructor Summary
ConstructorDescriptionSlidingWindowChannel
(JavaClassDataChannel dataChannel, org.palladiosimulator.pcm.core.composition.AssemblyContext assemblyContext, org.palladiosimulator.simulizar.interpreter.InterpreterDefaultContext mainContext, de.uka.ipd.sdq.scheduler.SchedulerModel model, org.palladiosimulator.simulizar.di.component.interfaces.SimulatedThreadComponent.Factory simulatedThreadComponentFactory, DataChannelResourceRegistry dataChannelResourceRegistry, double windowSize, double windowShift, double gracePeriod, boolean scheduledAdvance, boolean advanceOnData, boolean emitEmptyWindows) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
acceptData
(DataSinkRole role, IndirectionDate date) protected boolean
canAcceptData
(DataSinkRole role) protected boolean
canProvideData
(DataSourceRole role) protected OptionalDouble
protected void
protected void
protected void
handleNewWatermarkedTime
(double oldWatermarkTime, double watermarkTime) protected void
provideDataAndAdvance
(DataSourceRole role, Consumer<IndirectionDate> continuation) It must hold that#provideDataAndAdvance(DataChannelSourceConnector)
can be called iffAbstractSimDataChannelResource.canProvideData(DataChannelSourceConnector)
was true immediately before the call.Methods inherited from class org.palladiosimulator.indirections.scheduler.AbstractSimDataChannelResource
advance, blockUntilCanGet, blockUntilCanPut, continueWithoutData, discardDataAndContinue, discardDateIfTooOld, discardIncomingDate, get, getCurrentWatermarkedTime, getId, getName, isDateTooOld, isPushingRole, notifyProcessesCanGetNewData, notifyProcessesCanPutNewData, processDataAvailableToGet, put, scheduleAdvance, scheduleDemand, unscheduleAdvance
-
Constructor Details
-
SlidingWindowChannel
public SlidingWindowChannel(JavaClassDataChannel dataChannel, org.palladiosimulator.pcm.core.composition.AssemblyContext assemblyContext, org.palladiosimulator.simulizar.interpreter.InterpreterDefaultContext mainContext, de.uka.ipd.sdq.scheduler.SchedulerModel model, org.palladiosimulator.simulizar.di.component.interfaces.SimulatedThreadComponent.Factory simulatedThreadComponentFactory, DataChannelResourceRegistry dataChannelResourceRegistry, double windowSize, double windowShift, double gracePeriod, boolean scheduledAdvance, boolean advanceOnData, boolean emitEmptyWindows)
-
-
Method Details
-
getDateWatermark
-
acceptData
- Specified by:
acceptData
in classAbstractSimDataChannelResource
-
canAcceptData
- Specified by:
canAcceptData
in classAbstractSimDataChannelResource
-
canProvideData
- Specified by:
canProvideData
in classAbstractSimDataChannelResource
-
handleCannotProceedToGet
- Specified by:
handleCannotProceedToGet
in classAbstractSimDataChannelResource
-
handleCannotProceedToPut
- Specified by:
handleCannotProceedToPut
in classAbstractSimDataChannelResource
-
handleNewWatermarkedTime
protected void handleNewWatermarkedTime(double oldWatermarkTime, double watermarkTime) - Specified by:
handleNewWatermarkedTime
in classAbstractSimDataChannelResource
-
provideDataAndAdvance
Description copied from class:AbstractSimDataChannelResource
It must hold that#provideDataAndAdvance(DataChannelSourceConnector)
can be called iffAbstractSimDataChannelResource.canProvideData(DataChannelSourceConnector)
was true immediately before the call.Calling
#provideDataAndAdvance(DataChannelSourceConnector)
in a loop must eventually lead toAbstractSimDataChannelResource.canProvideData(DataChannelSourceConnector)
returningfalse
.- Specified by:
provideDataAndAdvance
in classAbstractSimDataChannelResource
-