public class ShardedTable extends Object implements RealLiveTable
| Modifier and Type | Field and Description |
|---|---|
static boolean |
DUMP_IN_PROC_CHANGES |
| Constructor and Description |
|---|
ShardedTable(RealLiveTable[] shards,
TableDescription desc) |
| Modifier and Type | Method and Description |
|---|---|
org.nustaq.kontraktor.IPromise<Boolean> |
add(int senderId,
String key,
Object... keyVals) |
void |
addNode(int[] slots,
RealLiveTable shard) |
org.nustaq.kontraktor.IPromise<Boolean> |
addRecord(int senderId,
Record rec) |
org.nustaq.kontraktor.IPromise |
atomic(String key,
RLFunction<Record,Object> action)
apply the function to the record with given key and return the result inside a promise
changes to the record inside the function are applied to the real record and a change message
is generated.
|
void |
atomicUpdate(RLPredicate<Record> filter,
RLFunction<Record,Boolean> action)
mass update.
|
<T> void |
forEachWithSpore(org.nustaq.kontraktor.Spore<Record,T> spore) |
org.nustaq.kontraktor.IPromise<Record> |
get(String key) |
org.nustaq.kontraktor.IPromise<TableDescription> |
getDescription() |
org.nustaq.kontraktor.IPromise<StorageStats> |
getStats() |
protected RealLiveTable[] |
hashAll(String key) |
protected RealLiveTable |
hashAny(String key) |
void |
merge(int senderId,
String key,
Object... keyVals) |
void |
mergeRecord(int senderId,
Record rec) |
org.nustaq.kontraktor.IPromise |
ping() |
void |
put(int senderId,
String key,
Object... keyVals) |
void |
realUnsubscribe(Subscriber subs) |
void |
receive(ChangeMessage change) |
void |
remove(int senderId,
String key) |
void |
removeNode(org.nustaq.kontraktor.Actor actorRef) |
void |
removeTableShard(RealLiveTable shard2Remove) |
org.nustaq.kontraktor.IPromise |
resizeIfLoadFactorLarger(double loadFactor,
long maxGrowBytes) |
void |
setRecord(int senderId,
Record rec) |
org.nustaq.kontraktor.IPromise<Long> |
size() |
void |
stop() |
void |
subscribe(Subscriber subs)
DO NOT USE DIRECTLY, use subscribeOn etc.
|
org.nustaq.kontraktor.IPromise<Record> |
take(int senderId,
String key) |
void |
unsubscribe(Subscriber subs) |
void |
unsubscribeById(int subsId) |
void |
update(int senderId,
String key,
Object... keyVals) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitfind, queryListadd, addRecord, merge, mergeRecord, put, remove, setRecord, updatelisten, observe, subscribeOn, subscribeOnforEach, forEach, map, querypublic ShardedTable(RealLiveTable[] shards, TableDescription desc)
public void addNode(int[] slots,
RealLiveTable shard)
public void removeTableShard(RealLiveTable shard2Remove)
protected RealLiveTable[] hashAll(String key)
protected RealLiveTable hashAny(String key)
public void receive(ChangeMessage change)
receive in interface ChangeReceiverpublic org.nustaq.kontraktor.IPromise resizeIfLoadFactorLarger(double loadFactor,
long maxGrowBytes)
resizeIfLoadFactorLarger in interface SafeRealLiveTablepublic void subscribe(Subscriber subs)
ChangeStreamsubscribe in interface ChangeStreampublic void unsubscribe(Subscriber subs)
unsubscribe in interface ChangeStreampublic void unsubscribeById(int subsId)
unsubscribeById in interface RealLiveTablepublic void realUnsubscribe(Subscriber subs)
public org.nustaq.kontraktor.IPromise atomic(String key, RLFunction<Record,Object> action)
RealLiveTableatomic in interface RealLiveTablepublic void atomicUpdate(RLPredicate<Record> filter, RLFunction<Record,Boolean> action)
RealLiveTableatomicUpdate in interface RealLiveTablefilter - - selects recordsaction - - function, the function might modify the record using putField. If false is returned, the record is deletedpublic void put(int senderId,
String key,
Object... keyVals)
put in interface SafeRealLiveTablepublic void merge(int senderId,
String key,
Object... keyVals)
merge in interface SafeRealLiveTablepublic org.nustaq.kontraktor.IPromise<Boolean> add(int senderId, String key, Object... keyVals)
add in interface SafeRealLiveTablepublic org.nustaq.kontraktor.IPromise<Boolean> addRecord(int senderId, Record rec)
addRecord in interface SafeRealLiveTablepublic void mergeRecord(int senderId,
Record rec)
mergeRecord in interface SafeRealLiveTablepublic void setRecord(int senderId,
Record rec)
setRecord in interface SafeRealLiveTablepublic void update(int senderId,
String key,
Object... keyVals)
update in interface SafeRealLiveTablepublic org.nustaq.kontraktor.IPromise<Record> take(int senderId, String key)
take in interface SafeRealLiveTablepublic void remove(int senderId,
String key)
remove in interface SafeRealLiveTablepublic <T> void forEachWithSpore(org.nustaq.kontraktor.Spore<Record,T> spore)
forEachWithSpore in interface RealLiveStreamActorpublic org.nustaq.kontraktor.IPromise ping()
ping in interface SafeRealLiveTablepublic org.nustaq.kontraktor.IPromise<TableDescription> getDescription()
getDescription in interface SafeRealLiveTablepublic void stop()
stop in interface SafeRealLiveTablepublic org.nustaq.kontraktor.IPromise<StorageStats> getStats()
getStats in interface SafeRealLiveTablepublic org.nustaq.kontraktor.IPromise<Record> get(String key)
get in interface SafeRealLiveTablepublic org.nustaq.kontraktor.IPromise<Long> size()
size in interface SafeRealLiveTablepublic void removeNode(org.nustaq.kontraktor.Actor actorRef)
Copyright © 2019. All rights reserved.