session

package
v1.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 8, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

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

func (w *Windower) OldestWindowEndTime() time.Time

OldestWindowEndTime returns the end time of the oldest window among both active and closed windows. If there are no windows, it returns -1.

func (*Windower) Strategy

func (w *Windower) Strategy() window.Strategy

Strategy returns the window strategy

func (*Windower) Type

func (*Windower) Type() window.Type

Type implements window.TimedWindower.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL