Documentation
¶
Index ¶
- func NewAccumulatorWindow(keys []string) window.TimedWindow
- func NewWindower(vertexInstance *dfv1.VertexInstance, timeout time.Duration) window.TimedWindower
- type Windower
- func (w *Windower) AssignWindows(message *isb.ReadMessage) []*window.TimedWindowRequest
- func (w *Windower) CloseWindows(currentTime time.Time) []*window.TimedWindowRequest
- func (w *Windower) DeleteClosedWindow(window window.TimedWindow)
- func (w *Windower) InsertWindow(_ window.TimedWindow)
- func (w *Windower) NextWindowToBeClosed() window.TimedWindow
- func (w *Windower) OldestWindowEndTime() time.Time
- func (w *Windower) Strategy() window.Strategy
- func (w *Windower) Type() window.Type
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewAccumulatorWindow ¶
func NewAccumulatorWindow(keys []string) window.TimedWindow
NewAccumulatorWindow creates a new Accumulator window.
func NewWindower ¶
func NewWindower(vertexInstance *dfv1.VertexInstance, timeout time.Duration) window.TimedWindower
NewWindower creates a new Windower for Accumulator window.
Types ¶
type Windower ¶
type Windower struct {
// contains filtered or unexported fields
}
Windower is an implementation of window.TimedWindower for Accumulator window.
func (*Windower) AssignWindows ¶
func (w *Windower) AssignWindows(message *isb.ReadMessage) []*window.TimedWindowRequest
AssignWindows assigns the windows for the given message. Since accumulator is based on the global window concept, we will have only one window per key.
func (*Windower) CloseWindows ¶
func (w *Windower) CloseWindows(currentTime time.Time) []*window.TimedWindowRequest
CloseWindows closes the windows that have expired based on the timeout and since the WM has progressed.
func (*Windower) DeleteClosedWindow ¶
func (w *Windower) DeleteClosedWindow(window window.TimedWindow)
DeleteClosedWindow deletes the event time entries from the window state till the window end time. Actual deletion of the state happens when the timeout expires.
func (*Windower) InsertWindow ¶
func (w *Windower) InsertWindow(_ window.TimedWindow)
InsertWindow inserts the window into the active windows. Since we have only one window for the key, it replaces the existing window.
func (*Windower) NextWindowToBeClosed ¶
func (w *Windower) NextWindowToBeClosed() window.TimedWindow
NextWindowToBeClosed returns the next window to be closed. Since accumulator is based on the global window concept, we don't have a window to be closed.
func (*Windower) OldestWindowEndTime ¶
OldestWindowEndTime returns the oldest event time among all the keyed windows.