public class WindowState<T> extends AbstractCollection<Event<T>>
Modifier and Type | Class and Description |
---|---|
static class |
WindowState.WindowPartition<T> |
Modifier and Type | Field and Description |
---|---|
static int |
MAX_PARTITION_EVENTS |
static int |
MIN_PARTITIONS |
Constructor and Description |
---|
WindowState(KeyValueState<Long,WindowState.WindowPartition<T>> windowPartitionsState,
KeyValueState<String,Deque<Long>> partitionIdsState,
KeyValueState<String,Optional<?>> windowSystemState,
Supplier<Map<String,Optional<?>>> windowSystemStateSupplier,
long maxEventsInMemory) |
Modifier and Type | Method and Description |
---|---|
boolean |
add(Event<T> event) |
void |
clearIteratorPins() |
void |
commit(long txid)
Commits the
WindowState . |
Iterator<Event<T>> |
iterator() |
void |
prepareCommit(long txid)
Prepares the
WindowState for commit. |
void |
rollback(boolean reInit)
Rolls back the
WindowState . |
int |
size() |
addAll, clear, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
equals, hashCode, parallelStream, removeIf, spliterator, stream
public static final int MAX_PARTITION_EVENTS
public static final int MIN_PARTITIONS
public WindowState(KeyValueState<Long,WindowState.WindowPartition<T>> windowPartitionsState, KeyValueState<String,Deque<Long>> partitionIdsState, KeyValueState<String,Optional<?>> windowSystemState, Supplier<Map<String,Optional<?>>> windowSystemStateSupplier, long maxEventsInMemory)
public boolean add(Event<T> event)
add
in interface Collection<Event<T>>
add
in class AbstractCollection<Event<T>>
public void clearIteratorPins()
public int size()
size
in interface Collection<Event<T>>
size
in class AbstractCollection<Event<T>>
public void prepareCommit(long txid)
WindowState
for commit.txid
- the transaction idpublic void commit(long txid)
WindowState
.txid
- the transaction idpublic void rollback(boolean reInit)
WindowState
.reInit
- if the members should be synced with the values from the state.Copyright © 2023 The Apache Software Foundation. All rights reserved.