@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(String name)
Creates a new
BucketStreamAggregatorState . |
Modifier and Type | Method and Description |
---|---|
BucketStreamState |
get(short partition)
Returns state for the vBucket
|
Iterator<BucketStreamState> |
iterator() |
String |
name()
Returns name of the DCP stream.
|
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) |
int |
size() |
String |
toString() |
Observable<BucketStreamStateUpdatedEvent> |
updates() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
forEach, spliterator
public BucketStreamAggregatorState(String name)
Creates a new BucketStreamAggregatorState
.
name
- name of the DCP connection.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 vBucket
partition
- vBucketID (partition number).public BucketStreamState remove(short partition)
public int size()
public String name()
Returns name of the DCP stream.
public Iterator<BucketStreamState> iterator()
iterator
in interface Iterable<BucketStreamState>
Copyright © 2015 Couchbase, Inc.. All rights reserved.