Search in sources :

Example 1 with Local

use of org.nustaq.kontraktor.annotations.Local in project kontraktor by RuedigerMoeller.

the class MyHttpApp method init.

@Local
public void init() {
    // you won't need many threads. If there is heavy computing or you do blocking operations (hint: don't)
    // inside a session actor, increase this. It will still work with hundreds of threads (but then you get jee ;) )
    clientThreads = new Scheduler[] { // only two session processor threads should be sufficient for small apps.
    new SimpleScheduler(CLIENT_QSIZE, true), new SimpleScheduler(CLIENT_QSIZE, true) };
    Thread.currentThread().setName("MyHttpApp Dispatcher");
}
Also used : SimpleScheduler(org.nustaq.kontraktor.impl.SimpleScheduler) Local(org.nustaq.kontraktor.annotations.Local)

Example 2 with Local

use of org.nustaq.kontraktor.annotations.Local in project kontraktor by RuedigerMoeller.

the class BasicWebAppActor method init.

@Local
public void init(C config) {
    int numSessionThreads = config.getNumSessionThreads();
    sessionThreads = new Scheduler[numSessionThreads];
    for (int i = 0; i < numSessionThreads; i++) {
        sessionThreads[i] = new SimpleScheduler(10_000, true);
    }
    sessionStorage = createSessionStorage(config);
    sessions = new HashMap<>();
}
Also used : SimpleScheduler(org.nustaq.kontraktor.impl.SimpleScheduler) Local(org.nustaq.kontraktor.annotations.Local)

Example 3 with Local

use of org.nustaq.kontraktor.annotations.Local in project kontraktor by RuedigerMoeller.

the class TableSpaceActor method init.

@Local
public void init() {
    tables = new HashMap();
    stateListeners = new ArrayList();
    tableDesc = new HashMap();
}
Also used : HashMap(java.util.HashMap) ArrayList(java.util.ArrayList) Local(org.nustaq.kontraktor.annotations.Local)

Aggregations

Local (org.nustaq.kontraktor.annotations.Local)3 SimpleScheduler (org.nustaq.kontraktor.impl.SimpleScheduler)2 ArrayList (java.util.ArrayList)1 HashMap (java.util.HashMap)1