Search in sources :

Example 11 with TableSpaceActor

use of org.nustaq.reallive.impl.tablespace.TableSpaceActor in project kontraktor by RuedigerMoeller.

the class DataClient method processSharded.

public void processSharded(String tableName, RLPredicate<Record> predicate, int shardNo, Callback<Record> cb) {
    TableSpaceActor shard = shards[shardNo];
    shard.getTableAsync(tableName).then(t -> {
        RealLiveTable table = t;
        table.forEach(predicate, cb);
    });
}
Also used : RealLiveTable(org.nustaq.reallive.api.RealLiveTable) TableSpaceActor(org.nustaq.reallive.impl.tablespace.TableSpaceActor)

Aggregations

TableSpaceActor (org.nustaq.reallive.impl.tablespace.TableSpaceActor)11 Test (org.junit.Test)7 Actors (org.nustaq.kontraktor.Actors)3 IPromise (org.nustaq.kontraktor.IPromise)3 Promise (org.nustaq.kontraktor.Promise)3 TCPNIOPublisher (org.nustaq.kontraktor.remoting.tcp.TCPNIOPublisher)3 RealLiveTable (org.nustaq.reallive.api.RealLiveTable)3 TableSpaceSharding (org.nustaq.reallive.impl.tablespace.TableSpaceSharding)3 CountDownLatch (java.util.concurrent.CountDownLatch)2 AtomicInteger (java.util.concurrent.atomic.AtomicInteger)2 IntStream (java.util.stream.IntStream)2 TCPConnectable (org.nustaq.kontraktor.remoting.tcp.TCPConnectable)2 org.nustaq.reallive.api (org.nustaq.reallive.api)2 FSTConfiguration (org.nustaq.serialization.FSTConfiguration)2 java.io (java.io)1 Arrays (java.util.Arrays)1 HashMap (java.util.HashMap)1 Iterator (java.util.Iterator)1 Map (java.util.Map)1 TimeUnit (java.util.concurrent.TimeUnit)1