syncbase java: add "with default opts" versions of watch methods
Change-Id: I6d732e483fa33d881eae03d8872452e3c850a87e
diff --git a/syncbase/src/main/java/io/v/syncbase/Database.java b/syncbase/src/main/java/io/v/syncbase/Database.java
index ed9aaa0..a669fd7 100644
--- a/syncbase/src/main/java/io/v/syncbase/Database.java
+++ b/syncbase/src/main/java/io/v/syncbase/Database.java
@@ -172,6 +172,14 @@
}
/**
+ * Calls {@code addSyncgroupInviteHandler(h, opts)} with default
+ * {@code AddSyncgroupInviteHandlerOptions}.
+ */
+ public void addSyncgroupInviteHandler(SyncgroupInviteHandler h) {
+ addSyncgroupInviteHandler(h, new AddSyncgroupInviteHandlerOptions());
+ }
+
+ /**
* Makes it so {@code h} stops receiving notifications.
*/
public void removeSyncgroupInviteHandler(SyncgroupInviteHandler h) {
@@ -294,7 +302,7 @@
* Creates a new batch. Instead of calling this function directly, clients are encouraged to use
* the {@code runInBatch} helper function, which detects "concurrent batch" errors and handles
* retries internally.
- * <p/>
+ * <p>
* Default concurrency semantics:
* <ul>
* <li>Reads (e.g. gets, scans) inside a batch operate over a consistent snapshot taken during
@@ -305,10 +313,10 @@
* <li>Other methods will never fail with error {@code ConcurrentBatchException}, even if it is
* known that {@code commit} will fail with this error.</li>
* </ul>
- * <p/>
+ * <p>
* Once a batch has been committed or aborted, subsequent method calls will fail with no
* effect.
- * <p/>
+ * <p>
* Concurrency semantics can be configured using BatchOptions.
*
* @param opts options for this batch
@@ -423,6 +431,14 @@
}
/**
+ * Calls {@code addWatchChangeHandler(h, opts)} with default
+ * {@code AddWatchChangeHandlerOptions}.
+ */
+ public void addWatchChangeHandler(WatchChangeHandler h) {
+ addWatchChangeHandler(h, new AddWatchChangeHandlerOptions());
+ }
+
+ /**
* Makes it so {@code h} stops receiving notifications.
*/
public void removeWatchChangeHandler(WatchChangeHandler h) {