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 AtomicIntegerFieldUpdater<ChronicleReaderStream> |
CONSUMER_UPDATER |
protected int |
consumers |
protected Codec<Buffer,K,K> |
keyCodec |
protected Map<K,V> |
localCache |
protected String |
name |
protected Codec<Buffer,V,V> |
valueCodec |
Constructor and Description |
---|
ChronicleReaderStream(String name)
Create a chronicle dispatcher
|
ChronicleReaderStream(String name,
net.openhft.chronicle.Chronicle chronicle)
Create a chronicle dispatcher
|
ChronicleReaderStream(String name,
net.openhft.chronicle.Chronicle chronicle,
Codec<Buffer,K,K> keyCodec,
Codec<Buffer,V,V> valueCodec) |
Modifier and Type | Method and Description |
---|---|
net.openhft.chronicle.Chronicle |
chronicle() |
void |
clear() |
boolean |
containsKey(Object key) |
boolean |
containsValue(Object value) |
@NotNull Set<Map.Entry<K,V>> |
entrySet() |
boolean |
equals(Object o) |
V |
get(Object key) |
int |
hashCode() |
boolean |
isEmpty() |
Codec<Buffer,K,K> |
keyCodec() |
@NotNull Set<K> |
keySet() |
Map<K,V> |
localCache() |
V |
put(K key,
V value) |
void |
putAll(Map<? extends K,? extends V> m) |
V |
remove(Object key) |
int |
size() |
void |
subscribe(org.reactivestreams.Subscriber<? super MapStream.Signal<K,V>> s) |
String |
toString() |
Codec<Buffer,V,V> |
valueCodec() |
@NotNull 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
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
protected final String name
protected final net.openhft.chronicle.Chronicle chronicle
protected volatile int consumers
protected static final AtomicIntegerFieldUpdater<ChronicleReaderStream> CONSUMER_UPDATER
public ChronicleReaderStream(String name) throws IOException
name
- The name of the dispatcher.IOException
public ChronicleReaderStream(String name, net.openhft.chronicle.Chronicle chronicle)
name
- The name of the dispatcher.chronicle
- The chronicle instance to usepublic ChronicleReaderStream(String name, net.openhft.chronicle.Chronicle chronicle, Codec<Buffer,K,K> keyCodec, Codec<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(Object key)
public boolean containsValue(Object value)
public boolean equals(Object o)
public int hashCode()
public boolean isEmpty()
public void clear()
public int size()
public net.openhft.chronicle.Chronicle chronicle()
@NotNull public @NotNull Collection<V> values()
Copyright © 2017. All rights reserved.