Skip to content

Commit eb55fe7

Browse files
author
Yegor Bugayenko
committed
#3 documentation
1 parent caf0a7e commit eb55fe7

File tree

4 files changed

+38
-2
lines changed

4 files changed

+38
-2
lines changed

src/main/java/co/stateful/Atomic.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@
6464
* @author Yegor Bugayenko (yegor@tpc2.com)
6565
* @version $Id$
6666
* @since 0.6
67+
* @link <a href="http://www.yegor256.com/2014/05/18/cloud-autoincrement-counters.html">Atomic Counters at Stateful.co</a>
68+
* @link <a href="http://www.yegor256.com/2014/12/04/synchronization-between-nodes.html">Synchronization Between Nodes</a>
6769
*/
6870
@Loggable(Loggable.DEBUG)
6971
@ToString

src/main/java/co/stateful/RtSttc.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,18 @@
5050
/**
5151
* Stateful Entry Point.
5252
*
53+
* <p>Make an instance of this class and start from there, for example,
54+
* if you want to use a cloud lock from
55+
* <a href="http://www.stateful.co">stateful.co</a>:
56+
*
57+
* <pre> Lock lock = new RtSttc(
58+
* new URN("urn:github:12345"), "token"
59+
* ).locks().lock("test");</pre>
60+
*
61+
* <p>You need two arguments to instantiate this class: URN of the user
62+
* and your secret token. You can get them at the home page of
63+
* <a href="http://www.stateful.co">stateful.co</a>, right on the top.
64+
*
5365
* <p>It is highly recommended to use
5466
* {@link co.stateful.retry.ReSttc} decorator, in production
5567
* environment.</p>
@@ -61,6 +73,8 @@
6173
* @author Yegor Bugayenko (yegor@tpc2.com)
6274
* @version $Id$
6375
* @since 0.1
76+
* @link <a href="http://www.yegor256.com/2014/05/18/cloud-autoincrement-counters.html">Atomic Counters at Stateful.co</a>
77+
* @link <a href="http://www.yegor256.com/2014/12/04/synchronization-between-nodes.html">Synchronization Between Nodes</a>
6478
*/
6579
@Immutable
6680
@Loggable(Loggable.DEBUG)

src/main/java/co/stateful/Sttc.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,23 @@
3535
/**
3636
* Stateful Entry Point.
3737
*
38+
* <p>Make an instance of this interface using {@link RtSttc}, for example,
39+
* if you want to use a cloud lock from
40+
* <a href="http://www.stateful.co">stateful.co</a>:
41+
*
42+
* <pre> Lock lock = new RtSttc(
43+
* new URN("urn:github:12345"), "token"
44+
* ).locks().lock("test");</pre>
45+
*
46+
* <p>You need two arguments to instantiate {@link RtSttc}: URN of the user
47+
* and your secret token. You can get them at the home page of
48+
* <a href="http://www.stateful.co">stateful.co</a>, right on the top.
49+
*
3850
* @author Yegor Bugayenko (yegor@tpc2.com)
3951
* @version $Id$
4052
* @since 0.1
53+
* @link <a href="http://www.yegor256.com/2014/05/18/cloud-autoincrement-counters.html">Atomic Counters at Stateful.co</a>
54+
* @link <a href="http://www.yegor256.com/2014/12/04/synchronization-between-nodes.html">Synchronization Between Nodes</a>
4155
*/
4256
@Immutable
4357
public interface Sttc {

src/main/java/co/stateful/package-info.java

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,12 @@
3131
/**
3232
* Stateful.co SDK.
3333
*
34-
* First, read the documentation at
34+
* <p>First, read the documentation at
3535
* <a href="http://java-sdk.stateful.co">java-sdk.stateful.co</a>. Then,
3636
* register an account at <a href="http://www.stateful.co">stateful.co</a>.
3737
* Then, you can try to use, for example, counters:
3838
*
39-
* <pre>public class Main {
39+
* <pre> public class Main {
4040
* public static void main(String... args) {
4141
* Sttc sttc = new RtSttc(
4242
* new URN("urn:github:526301"),
@@ -51,8 +51,14 @@
5151
* }
5252
* }</pre>
5353
*
54+
* <p>You need two arguments to instantiate {@link RtSttc}: URN of the user
55+
* and your secret token. You can get them at the home page of
56+
* <a href="http://www.stateful.co">stateful.co</a>, right on the top.
57+
*
5458
* @author Yegor Bugayenko (yegor@tpc2.com)
5559
* @version $Id$
5660
* @since 0.1
61+
* @link <a href="http://www.yegor256.com/2014/05/18/cloud-autoincrement-counters.html">Atomic Counters at Stateful.co</a>
62+
* @link <a href="http://www.yegor256.com/2014/12/04/synchronization-between-nodes.html">Synchronization Between Nodes</a>
5763
*/
5864
package co.stateful;

0 commit comments

Comments
 (0)