Documentation ¶
Index ¶
- func NewSessionWindow(startTime time.Time, gap time.Duration, message *isb.ReadMessage) window.TimedWindow
- func NewWindower(gap time.Duration, vertexInstance *dfv1.VertexInstance) window.TimedWindower
- type Windower
- func (w *Windower) AssignWindows(message *isb.ReadMessage) []*window.TimedWindowRequest
- func (w *Windower) CloseWindows(time time.Time) []*window.TimedWindowRequest
- func (w *Windower) DeleteClosedWindow(window window.TimedWindow)
- func (w *Windower) InsertWindow(tw window.TimedWindow)
- func (w *Windower) NextWindowToBeClosed() window.TimedWindow
- func (w *Windower) OldestWindowEndTime() time.Time
- func (w *Windower) Strategy() window.Strategy
- func (*Windower) Type() window.Type
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewSessionWindow ¶
func NewSessionWindow(startTime time.Time, gap time.Duration, message *isb.ReadMessage) window.TimedWindow
func NewWindower ¶
func NewWindower(gap time.Duration, vertexInstance *dfv1.VertexInstance) window.TimedWindower
Types ¶
type Windower ¶
type Windower struct {
// contains filtered or unexported fields
}
Windower is an implementation of TimedWindower of session window, windower is responsible for assigning windows to the incoming messages and closing the windows that are past the watermark.
func (*Windower) AssignWindows ¶
func (w *Windower) AssignWindows(message *isb.ReadMessage) []*window.TimedWindowRequest
AssignWindows assigns the event to the window based on give window configuration. This assignment could trigger the following - New window Creation - Expand an existing window - Append to an existing window (the message has the event-time such that gap + event-time is < window end time).
func (*Windower) CloseWindows ¶
func (w *Windower) CloseWindows(time time.Time) []*window.TimedWindowRequest
CloseWindows closes the windows that are past the watermark and also merges the windows that should be merged.
func (*Windower) DeleteClosedWindow ¶
func (w *Windower) DeleteClosedWindow(window window.TimedWindow)
DeleteClosedWindow deletes the window from the closed windows list.
func (*Windower) InsertWindow ¶
func (w *Windower) InsertWindow(tw window.TimedWindow)
InsertWindow inserts a window to the list of active windows.
func (*Windower) NextWindowToBeClosed ¶
func (w *Windower) NextWindowToBeClosed() window.TimedWindow
NextWindowToBeClosed returns the next window yet to be closed.
func (*Windower) OldestWindowEndTime ¶
OldestWindowEndTime returns the end time of the oldest window among both active and closed windows. If there are no windows, it returns -1.