@InterfaceStability.Experimental @InterfaceAudience.Public public class BucketStreamAggregatorState extends Object implements Iterable<BucketStreamState>
State of the stream aggregator.
It contains list of the stream states.
Constructor and Description |
---|
BucketStreamAggregatorState()
Creates a new
BucketStreamAggregatorState . |
Modifier and Type | Method and Description |
---|---|
BucketStreamState |
get(short partition)
Returns state for the partition
|
Iterator<BucketStreamState> |
iterator() |
void |
put(BucketStreamState state)
Sets state for particular vBucket and notifies listener.
|
void |
put(BucketStreamState state,
boolean notify)
Sets state for particular vBucket and optionally notifies listener.
|
BucketStreamState |
remove(short partition)
Removes state for the partition.
|
int |
size() |
String |
toString() |
Observable<BucketStreamStateUpdatedEvent> |
updates() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
forEach, spliterator
public BucketStreamAggregatorState()
Creates a new BucketStreamAggregatorState
.
public Observable<BucketStreamStateUpdatedEvent> updates()
public void put(BucketStreamState state)
Sets state for particular vBucket and notifies listener.
state
- stream statepublic void put(BucketStreamState state, boolean notify)
Sets state for particular vBucket and optionally notifies listener.
state
- stream statenotify
- false if state notification should be skippedpublic BucketStreamState get(short partition)
Returns state for the partition
partition
- vBucketID (partition number).public BucketStreamState remove(short partition)
Removes state for the partition.
partition
- vBucketID (partition number).public int size()
public Iterator<BucketStreamState> iterator()
iterator
in interface Iterable<BucketStreamState>
Copyright © 2016 Couchbase, Inc.. All rights reserved.