git commit: typos/updates

2014-02-22 Thread randgalt
Repository: curator
Updated Branches:
  refs/heads/CURATOR-88 938f3748d -> cde552f25


typos/updates


Project: http://git-wip-us.apache.org/repos/asf/curator/repo
Commit: http://git-wip-us.apache.org/repos/asf/curator/commit/cde552f2
Tree: http://git-wip-us.apache.org/repos/asf/curator/tree/cde552f2
Diff: http://git-wip-us.apache.org/repos/asf/curator/diff/cde552f2

Branch: refs/heads/CURATOR-88
Commit: cde552f254fc75281822a439b321a43179adec9d
Parents: 938f374
Author: randgalt 
Authored: Sun Feb 23 13:25:09 2014 +0530
Committer: randgalt 
Committed: Sun Feb 23 13:25:09 2014 +0530

--
 curator-x-rest/src/site/confluence/apis.confluence   | 4 ++--
 curator-x-rest/src/site/confluence/client.confluence | 4 +++-
 2 files changed, 5 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/curator/blob/cde552f2/curator-x-rest/src/site/confluence/apis.confluence
--
diff --git a/curator-x-rest/src/site/confluence/apis.confluence 
b/curator-x-rest/src/site/confluence/apis.confluence
index 920c516..e09fc4b 100644
--- a/curator-x-rest/src/site/confluence/apis.confluence
+++ b/curator-x-rest/src/site/confluence/apis.confluence
@@ -2,8 +2,6 @@
 
 h1. APIs
 
-Here are the available APIs:
-
 h2. Status APIs
 
 ||URL||Method||Request Entity||Response Entity||Description||
@@ -45,6 +43,8 @@ h2. Recipe APIs
 |/curator/v1/recipes/leader/{leader-id}|DELETE|n/a|n/a|Release/delete 
leadership.|
 |/curator/v1/recipes/leader/{leader-id}|GET|n/a|array of ParticipantSpecs|List 
of participants in the leader election.|
 
+*MORE TBD*
+
 h2. Entities
 
 See the [[Entity Descriptions Page|entities.html]] for details on the Entities 
used in the APIs.

http://git-wip-us.apache.org/repos/asf/curator/blob/cde552f2/curator-x-rest/src/site/confluence/client.confluence
--
diff --git a/curator-x-rest/src/site/confluence/client.confluence 
b/curator-x-rest/src/site/confluence/client.confluence
index 94683dd..ce99b72 100644
--- a/curator-x-rest/src/site/confluence/client.confluence
+++ b/curator-x-rest/src/site/confluence/client.confluence
@@ -14,7 +14,7 @@ Status for more details. Also, see the [[APIs|apis.html]] 
page for additional de
 
 h2. Handling Stateful APIs
 
-For the stateful APIs, you should keep an record for each active API. The 
record should contain the Curator REST Proxy instance
+For the stateful APIs, you should keep a record for each active API. The 
record should contain the Curator REST Proxy instance
 that fulfilled the API call and the response ID that was returned. You must 
periodically send these IDs using the POST version
 of the status API (see below) to avoid the Proxy expiring the APIs product 
(watcher, lock, etc.). See the lock example below.
 
@@ -61,6 +61,8 @@ do record in maintainedRecords
 if message.type is "watch" ...
 etc...
 end
+
+sleep-for-a-bit
 end
 {code}
 



[2/2] git commit: initial version complete. Still needed testing and validation

2014-02-22 Thread randgalt
initial version complete. Still needed testing and validation


Project: http://git-wip-us.apache.org/repos/asf/curator/repo
Commit: http://git-wip-us.apache.org/repos/asf/curator/commit/938f3748
Tree: http://git-wip-us.apache.org/repos/asf/curator/tree/938f3748
Diff: http://git-wip-us.apache.org/repos/asf/curator/diff/938f3748

Branch: refs/heads/CURATOR-88
Commit: 938f3748dae783b4f1762b63a6c3932b40655d13
Parents: 037a467
Author: randgalt 
Authored: Sun Feb 23 12:45:25 2014 +0530
Committer: randgalt 
Committed: Sun Feb 23 12:45:25 2014 +0530

--
 curator-x-rest/src/site/confluence/apis.confluence | 17 -
 .../src/site/confluence/client.confluence  |  2 +-
 .../src/site/confluence/entities.confluence| 11 ++-
 3 files changed, 19 insertions(+), 11 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/curator/blob/938f3748/curator-x-rest/src/site/confluence/apis.confluence
--
diff --git a/curator-x-rest/src/site/confluence/apis.confluence 
b/curator-x-rest/src/site/confluence/apis.confluence
index abde4ca..920c516 100644
--- a/curator-x-rest/src/site/confluence/apis.confluence
+++ b/curator-x-rest/src/site/confluence/apis.confluence
@@ -12,8 +12,6 @@ h2. Status APIs
 
 h2. Client APIs
 
-NOTE: Not all combinations are valid *TBD*
-
 ||URL||Method||Request Entity||Response Entity||Description||
 |/get-children|POST|GetChildrenSpec|Array of strings|This is the equivalent of 
CuratorFramework.getChildren().|
 |/create|POST|CreateSpec|PathAndId|This is the equivalent of 
CuratorFramework.create().|
@@ -24,17 +22,22 @@ NOTE: Not all combinations are valid *TBD*
 
 h3. How Asynchronous APIs Are Handled
 
-*TBD*
+For async versions of the Client APIs, the result is returned via a Status 
Message. See the [[Managing Status|client.html]] section for details
+as well as the [[Status Messages|status.html]] page which details the 
Asynchronous Client APIs messages.
 
 h3. How Watchers Are Handled
 
-*TBD*
+If you set "isWatched" to true in a Client API, a status message is generated 
when the watcher fires. See the [[Managing Status|client.html]]
+section for details as well as the [[Status Messages|status.html]] page which 
details the Watchers message.
 
 h3. How Ephemeral Nodes Are Handled
 
-*TBD*
+If you create an ephemeral node using the Client APIs, you must periodically 
send a heartbeat with the ID of the ephemeral node (as
+returned by the API). See the [[Client Page|client.html]] for details. 
IMPORTANT: if you fail to send heartbeats within the configured
+session length, the Curator REST Proxy will delete the ephemeral node (sending 
an expiration status message).
 
 h2. Recipe APIs
+
 ||URL||Method||Request Entity||Response Entity||Description||
 |/curator/v1/recipes/lock|POST|LockSpec|IdSpec|An InterProcessSemaphoreMutex. 
On successful return, your client will be holding the specified lock until you 
delete the lock via the delete API.|
 |/curator/v1/recipes/lock/{lock-id}|DELETE|n/a|n/a|Release and delete a lock.|
@@ -42,10 +45,6 @@ h2. Recipe APIs
 |/curator/v1/recipes/leader/{leader-id}|DELETE|n/a|n/a|Release/delete 
leadership.|
 |/curator/v1/recipes/leader/{leader-id}|GET|n/a|array of ParticipantSpecs|List 
of participants in the leader election.|
 
-h3. Handling Timeouts, Status and Releasing
-
-*TBD - releases must go to same server, etc.
-
 h2. Entities
 
 See the [[Entity Descriptions Page|entities.html]] for details on the Entities 
used in the APIs.

http://git-wip-us.apache.org/repos/asf/curator/blob/938f3748/curator-x-rest/src/site/confluence/client.confluence
--
diff --git a/curator-x-rest/src/site/confluence/client.confluence 
b/curator-x-rest/src/site/confluence/client.confluence
index 9f9054e..94683dd 100644
--- a/curator-x-rest/src/site/confluence/client.confluence
+++ b/curator-x-rest/src/site/confluence/client.confluence
@@ -41,7 +41,7 @@ Here is pseudo-code for doing a distributed lock using the 
Curator REST Proxy:
 
 {code}
 Address address = ... # host and port of the Curator REST Proxy instance
-LockSpec lock = {path: "/lock/path", maxWaitMs=5000}
+LockSpec lock = {path: "/lock/path", maxWaitMs: 5000}
 IdSpec lockId = restClient.post(address, "/curator/v1/recipes/lock", lock)
 statusMaintainer.add(address, lockId)
 ... do work here while in the acquired mutex ...

http://git-wip-us.apache.org/repos/asf/curator/blob/938f3748/curator-x-rest/src/site/confluence/entities.confluence
--
diff --git a/curator-x-rest/src/site/confluence/entities.confluence 
b/curator-x-rest/src/site/confluence/entities.confluence
index 910cea8..d1ce778 100644
--- a/curator-x-rest/src/site/confluence/entities.confluence
+++ b/c

[1/2] git commit: wip

2014-02-22 Thread randgalt
Repository: curator
Updated Branches:
  refs/heads/CURATOR-88 a4ca2d5a9 -> 938f3748d


wip


Project: http://git-wip-us.apache.org/repos/asf/curator/repo
Commit: http://git-wip-us.apache.org/repos/asf/curator/commit/037a4675
Tree: http://git-wip-us.apache.org/repos/asf/curator/tree/037a4675
Diff: http://git-wip-us.apache.org/repos/asf/curator/diff/037a4675

Branch: refs/heads/CURATOR-88
Commit: 037a46755fbe60a7b2da22d45524eac72c7e2535
Parents: a4ca2d5
Author: randgalt 
Authored: Sun Feb 23 12:28:28 2014 +0530
Committer: randgalt 
Committed: Sun Feb 23 12:28:28 2014 +0530

--
 .../src/site/confluence/index.confluence|   3 +-
 .../org/apache/curator/x/rest/api/Session.java  |   9 ++-
 .../src/site/confluence/build.confluence|  43 
 .../src/site/confluence/client.confluence   |  66 +++
 .../src/site/confluence/deploy.confluence   |  12 
 .../src/site/confluence/entities.confluence |   2 -
 .../src/site/confluence/index.confluence|  28 ++--
 .../src/site/confluence/status.confluence   |   8 ++-
 .../src/site/resources/images/client-all.png| Bin 0 -> 96004 bytes
 .../site/resources/images/client-requests.png   | Bin 0 -> 134807 bytes
 .../src/site/resources/images/client.png| Bin 134807 -> 99026 bytes
 11 files changed, 143 insertions(+), 28 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/curator/blob/037a4675/curator-x-discovery-server/src/site/confluence/index.confluence
--
diff --git a/curator-x-discovery-server/src/site/confluence/index.confluence 
b/curator-x-discovery-server/src/site/confluence/index.confluence
index 2ff1b01..e0c7737 100644
--- a/curator-x-discovery-server/src/site/confluence/index.confluence
+++ b/curator-x-discovery-server/src/site/confluence/index.confluence
@@ -87,4 +87,5 @@ h2. getAny
 *Description:* {name} is the service name. Return a random instance from the 
given service or 404.
 
 h2. JSON specs
-The JSON specifications for the REST entities are documented here: 
https://git-wip-us.apache.org/repos/asf?p=curator.git;a=blob_plain;f=curator-x-discovery-server/README.txt;hb=HEAD
+The JSON specifications for the REST entities are documented here:
+[[https://git-wip-us.apache.org/repos/asf?p=curator.git;a=blob\_plain;f=curator-x-discovery-server/README.txt;hb=HEAD]]

http://git-wip-us.apache.org/repos/asf/curator/blob/037a4675/curator-x-rest/src/main/java/org/apache/curator/x/rest/api/Session.java
--
diff --git 
a/curator-x-rest/src/main/java/org/apache/curator/x/rest/api/Session.java 
b/curator-x-rest/src/main/java/org/apache/curator/x/rest/api/Session.java
index 1a487f8..f8bf80d 100644
--- a/curator-x-rest/src/main/java/org/apache/curator/x/rest/api/Session.java
+++ b/curator-x-rest/src/main/java/org/apache/curator/x/rest/api/Session.java
@@ -75,7 +75,7 @@ public class Session implements Closeable
 if ( elapsedSinceLastUse > sessionLengthMs )
 {
 String id = mapEntry.getKey();
-pushMessage(new StatusMessage(Constants.EXPIRED, id, 
entry.thing.getClass().getSimpleName(), ""));
+pushMessage(new StatusMessage(Constants.EXPIRED, id, 
getSimpleName(entry), ""));
 log.warn(String.format("Expiring object. Elapsed time: %d, id: 
%s, Class: %s", elapsedSinceLastUse, id, entry.thing.getClass().getName()));
 
 things.remove(id);
@@ -142,4 +142,11 @@ public class Session implements Closeable
 }
 return null;
 }
+
+private static String getSimpleName(Entry entry)
+{
+String simpleName = entry.thing.getClass().getSimpleName();
+String[] value = simpleName.split("\\.");
+return (value.length > 0) ? value[0] : simpleName;
+}
 }

http://git-wip-us.apache.org/repos/asf/curator/blob/037a4675/curator-x-rest/src/site/confluence/build.confluence
--
diff --git a/curator-x-rest/src/site/confluence/build.confluence 
b/curator-x-rest/src/site/confluence/build.confluence
new file mode 100644
index 000..0e9bb23
--- /dev/null
+++ b/curator-x-rest/src/site/confluence/build.confluence
@@ -0,0 +1,43 @@
+[[Curator REST Proxy|index.html]] / Building and Packaging
+
+h1. Building and Packaging
+
+The Curator REST Proxy can be packaged as a standalone application or 
incorporated into your own custom application.
+
+h2. Standalone
+
+For the standalone version, the excellent 
[[Dropwizard|http://dropwizard.codahale.com/]] is used. The standalone version
+is built via Apache Maven. To build:
+
+# Download this [[Maven pom 
file|https://git-wip-us.apache.org/repos/asf?p=curator.git;a=blob\_plain;f=curator-x-rest/src/main/resourc