Package co.stateful
Class RtSttc
- java.lang.Object
-
- co.stateful.RtSttc
-
- All Implemented Interfaces:
Sttc
@Immutable @Loggable(1) public final class RtSttc extends Object implements Sttc
Stateful Entry Point.Make an instance of this class and start from there, for example, if you want to use a cloud lock from stateful.co:
Lock lock = new RtSttc( new URN("urn:github:12345"), "token" ).locks().lock("test");You need two arguments to instantiate this class: URN of the user and your secret token. You can get them at the home page of stateful.co, right on the top.
It is highly recommended to use
ReSttcdecorator, in production environment.It is also highly recommended to use
CdSttcdecorator, in production environment.- Since:
- 0.1
- See Also:
- Atomic Counters at Stateful.co, Synchronization Between Nodes
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Counterscounters()Counters.Lockslocks()Locks.static Sttcmake(com.jcabi.urn.URN urn, String token)Make an instance of it.
-
-
-
Constructor Detail
-
RtSttc
public RtSttc(com.jcabi.urn.URN urn, String token)Ctor.- Parameters:
urn- Owner URNtoken- Security token
-
-
Method Detail
-
make
public static Sttc make(com.jcabi.urn.URN urn, String token)
Make an instance of it.- Parameters:
urn- Owner URNtoken- Security token- Returns:
- Sttc
-
counters
public Counters counters() throws IOException
Description copied from interface:SttcCounters.- Specified by:
countersin interfaceSttc- Returns:
- Counters
- Throws:
IOException- If some I/O problem
-
locks
public Locks locks() throws IOException
Description copied from interface:SttcLocks.- Specified by:
locksin interfaceSttc- Returns:
- Locks
- Throws:
IOException- If some I/O problem
-
-