public class TableSharding extends Object implements RealLiveTable
| Constructor and Description |
|---|
TableSharding(ShardFunc func,
RealLiveTable[] shards,
TableDescription desc) |
| Modifier and Type | Method and Description |
|---|---|
org.nustaq.kontraktor.IPromise<Boolean> |
add(String key,
Object... keyVals) |
org.nustaq.kontraktor.IPromise<Boolean> |
addRecord(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() |
void |
merge(String key,
Object... keyVals) |
void |
mergeRecord(Record rec) |
org.nustaq.kontraktor.IPromise |
ping() |
void |
put(String key,
Object... keyVals) |
void |
receive(ChangeMessage change) |
void |
remove(String key) |
org.nustaq.kontraktor.IPromise |
resizeIfLoadFactorLarger(double loadFactor,
long maxGrowBytes) |
void |
setRecord(Record rec) |
org.nustaq.kontraktor.IPromise<Long> |
size() |
void |
stop() |
void |
subscribe(Subscriber subs) |
org.nustaq.kontraktor.IPromise<Record> |
take(String key) |
void |
unsubscribe(Subscriber subs) |
void |
update(String key,
Object... keyVals) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitsubscribeOn, subscribeOnforEach, map, querypublic TableSharding(ShardFunc func, RealLiveTable[] shards, TableDescription desc)
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)
subscribe in interface ChangeStreampublic void unsubscribe(Subscriber subs)
unsubscribe in interface ChangeStreampublic 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(String key, Object... keyVals)
put in interface SafeRealLiveTablepublic void merge(String key, Object... keyVals)
merge in interface SafeRealLiveTablepublic org.nustaq.kontraktor.IPromise<Boolean> add(String key, Object... keyVals)
add in interface SafeRealLiveTablepublic org.nustaq.kontraktor.IPromise<Boolean> addRecord(Record rec)
addRecord in interface SafeRealLiveTablepublic void mergeRecord(Record rec)
mergeRecord in interface SafeRealLiveTablepublic void setRecord(Record rec)
setRecord in interface SafeRealLiveTablepublic void update(String key, Object... keyVals)
update in interface SafeRealLiveTablepublic org.nustaq.kontraktor.IPromise<Record> take(String key)
take in interface SafeRealLiveTablepublic void remove(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 SafeRealLiveTableCopyright © 2017. All rights reserved.