T- The type of elements in the set.
@Experimental(value=STATE) public interface SetState<T> extends GroupingState<T,java.lang.Iterable<T>>
ReadableStatecell containing a set of elements.
Implementations of this form of state are expected to implement set operations such as
contains(Object) efficiently, reading as little of the overall set as possible.
|Modifier and Type||Method and Description|
Ensures a value is a member of the set, returning
Indicate that the value will be read later.
Removes the specified element from this set if it is present.
ReadableState<java.lang.Boolean> contains(T t)
ReadableState.read()method will return true if this set contains the specified element at the point when that
ReadableState<java.lang.Boolean> addIfAbsent(T t)
trueif it was added and
Elements added will not be reflected in
OutputT objects returned by previous calls
void remove(T t)
Changes will not be reflected in
OutputT objects returned by previous calls to
This allows an implementation to start an asynchronous prefetch or to include this state in the next batch of reads.