public class ChronicleReaderStream<K,V> extends MapStream<K,V>
Dispatcher
that uses a IndexedChronicle
to
queue tasks to execute.
Original design on https://github.com/peter-lawrey/Java-Chronicle (MapWrapper and Datastore)
MapStream.MutableSignal<K,V>, MapStream.Operation, MapStream.Signal<K,V>
Modifier and Type | Field and Description |
---|---|
protected net.openhft.chronicle.Chronicle |
chronicle |
protected static java.util.concurrent.atomic.AtomicIntegerFieldUpdater<ChronicleReaderStream> |
CONSUMER_UPDATER |
protected int |
consumers |
protected reactor.io.codec.Codec<reactor.io.buffer.Buffer,K,K> |
keyCodec |
protected java.util.Map<K,V> |
localCache |
protected java.lang.String |
name |
protected reactor.io.codec.Codec<reactor.io.buffer.Buffer,V,V> |
valueCodec |
Constructor and Description |
---|
ChronicleReaderStream(java.lang.String name)
Create a chronicle dispatcher
|
ChronicleReaderStream(java.lang.String name,
net.openhft.chronicle.Chronicle chronicle)
Create a chronicle dispatcher
|
ChronicleReaderStream(java.lang.String name,
net.openhft.chronicle.Chronicle chronicle,
reactor.io.codec.Codec<reactor.io.buffer.Buffer,K,K> keyCodec,
reactor.io.codec.Codec<reactor.io.buffer.Buffer,V,V> valueCodec) |
Modifier and Type | Method and Description |
---|---|
net.openhft.chronicle.Chronicle |
chronicle() |
void |
clear() |
boolean |
containsKey(java.lang.Object key) |
boolean |
containsValue(java.lang.Object value) |
java.util.Set<java.util.Map.Entry<K,V>> |
entrySet() |
boolean |
equals(java.lang.Object o) |
V |
get(java.lang.Object key) |
int |
hashCode() |
boolean |
isEmpty() |
reactor.io.codec.Codec<reactor.io.buffer.Buffer,K,K> |
keyCodec() |
java.util.Set<K> |
keySet() |
java.util.Map<K,V> |
localCache() |
V |
put(K key,
V value) |
void |
putAll(java.util.Map<? extends K,? extends V> m) |
V |
remove(java.lang.Object key) |
int |
size() |
void |
subscribe(org.reactivestreams.Subscriber<? super MapStream.Signal<K,V>> s) |
java.lang.String |
toString() |
reactor.io.codec.Codec<reactor.io.buffer.Buffer,V,V> |
valueCodec() |
java.util.Collection<V> |
values() |
adaptiveConsume, adaptiveConsumeOn, after, batchConsume, batchConsumeOn, broadcast, broadcastOn, broadcastTo, buffer, buffer, buffer, buffer, buffer, buffer, buffer, buffer, buffer, buffer, buffer, cache, cancelSubscription, capacity, cast, combine, concatMap, concatWith, consume, consume, consume, consume, consume, consumeLater, consumeOn, consumeOn, consumeOn, count, count, decode, defaultIfEmpty, dematerialize, dispatchOn, dispatchOn, dispatchOn, distinct, distinct, distinctUntilChanged, distinctUntilChanged, downstreamSubscription, elapsed, elementAt, elementAtOrDefault, encode, env, exists, fanIn, filter, filter, finallyDo, flatMap, getCapacity, getDispatcher, getEnvironment, getTimer, groupBy, ignoreError, ignoreError, isReactivePull, join, joinWith, keepAlive, last, lift, log, log, map, materialize, merge, mergeWith, nest, next, observe, observeCancel, observeComplete, observeError, observeStart, observeSubscribe, onErrorResumeNext, onErrorResumeNext, onErrorReturn, onErrorReturn, onOverflowBuffer, onOverflowBuffer, onOverflowDrop, partition, partition, process, recover, reduce, reduce, repeat, repeat, repeatWhen, requestWhen, retry, retry, retry, retry, retryWhen, sample, sample, sample, sample, sample, sample, sampleFirst, sampleFirst, sampleFirst, sampleFirst, sampleFirst, sampleFirst, scan, scan, skip, skip, skip, skipWhile, skipWhile, sort, sort, sort, sort, split, split, startWith, startWith, startWith, subscribe, subscribeOn, subscribeOn, subscribeOn, switchMap, take, take, take, takeWhile, tap, throttle, throttle, timeout, timeout, timeout, timeout, timestamp, toBlockingQueue, toBlockingQueue, toList, toList, unbounded, when, window, window, window, window, window, window, window, window, window, window, window, zip, zipWith, zipWith
protected final java.lang.String name
protected final net.openhft.chronicle.Chronicle chronicle
protected volatile int consumers
protected static final java.util.concurrent.atomic.AtomicIntegerFieldUpdater<ChronicleReaderStream> CONSUMER_UPDATER
public ChronicleReaderStream(java.lang.String name) throws java.io.IOException
name
- The name of the dispatcher.java.io.IOException
public ChronicleReaderStream(java.lang.String name, net.openhft.chronicle.Chronicle chronicle)
name
- The name of the dispatcher.chronicle
- The chronicle instance to usepublic ChronicleReaderStream(java.lang.String name, net.openhft.chronicle.Chronicle chronicle, reactor.io.codec.Codec<reactor.io.buffer.Buffer,K,K> keyCodec, reactor.io.codec.Codec<reactor.io.buffer.Buffer,V,V> valueCodec)
name
- The name of the dispatcherchronicle
- The chronicle instance to usekeyCodec
- The codec to encode/decode key, if null will rely on Chronicle serializationvalueCodec
- The codec to encode/decode values, if null will rely on Chronicle serializationpublic void subscribe(org.reactivestreams.Subscriber<? super MapStream.Signal<K,V>> s)
public boolean containsKey(java.lang.Object key)
public boolean containsValue(java.lang.Object value)
public boolean equals(java.lang.Object o)
public V get(java.lang.Object key)
public int hashCode()
public boolean isEmpty()
@NotNull public java.util.Set<K> keySet()
public void clear()
public V remove(java.lang.Object key)
public int size()
public net.openhft.chronicle.Chronicle chronicle()
@NotNull public java.util.Collection<V> values()
public java.lang.String toString()
toString
in class Stream<MapStream.Signal<K,V>>