accumulate

package
v1.5.2 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2025 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

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

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

OldestWindowEndTime returns the oldest event time among all the keyed windows.

func (*Windower) Strategy

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

func (*Windower) Type

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

Type returns the window type. Accumulator window falls under the unaligned window type since it doesn't have a fixed window size.

Jump to

Keyboard shortcuts

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