| Interface | Description |
|---|---|
| Counter |
Counter.
|
| Counters |
Counters.
|
| Lock |
Lock.
|
| Locks |
Locks.
|
| Sttc |
Stateful Entry Point.
|
| Class | Description |
|---|---|
| Atomic<T> |
Atomic block of code.
|
| RtSttc |
Stateful Entry Point.
|
First, read the documentation at java-sdk.stateful.co. Then, register an account at stateful.co. Then, you can try to use, for example, counters:
public class Main {
public static void main(String... args) {
Sttc sttc = new RtSttc(
new URN("urn:github:526301"),
"9FF3-41E0-73FB-F900"
);
String name = "test-123";
Counters counters = sttc.counters();
Counter counter = counters.create(name);
long value = counter.incrementAndGet(1L);
System.out.println("new value: " + value);
counters.delete(name);
}
}
You need two arguments to instantiate RtSttc: URN of the user
and your secret token. You can get them at the home page of
stateful.co, right on the top.
Copyright © 2014–2015 stateful.co. All rights reserved.