aries-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] cschneider closed pull request #6: Define the positionToString signature explicitly in the API
Date Thu, 03 Jan 2019 14:53:16 GMT
cschneider closed pull request #6: Define the positionToString signature explicitly in the
API
URL: https://github.com/apache/aries-journaled-events/pull/6
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/org.apache.aries.events.api/src/main/java/org/apache/aries/events/api/Position.java
b/org.apache.aries.events.api/src/main/java/org/apache/aries/events/api/Position.java
index c6ed99f..08f8f7f 100644
--- a/org.apache.aries.events.api/src/main/java/org/apache/aries/events/api/Position.java
+++ b/org.apache.aries.events.api/src/main/java/org/apache/aries/events/api/Position.java
@@ -25,4 +25,13 @@
  */
 public interface Position {
     long getOffset();
+
+
+    /**
+     * Serialise the position into a {@code String} string.
+     *
+     * @see {@link Messaging#positionFromString(String)} for the reverse operation.
+     * @return the position as a string
+     */
+    String positionToString();
 }
diff --git a/org.apache.aries.events.memory/src/main/java/org/apache/aries/events/memory/MemoryPosition.java
b/org.apache.aries.events.memory/src/main/java/org/apache/aries/events/memory/MemoryPosition.java
index b2b8ae5..6619ab7 100644
--- a/org.apache.aries.events.memory/src/main/java/org/apache/aries/events/memory/MemoryPosition.java
+++ b/org.apache.aries.events.memory/src/main/java/org/apache/aries/events/memory/MemoryPosition.java
@@ -32,7 +32,12 @@ public long getOffset() {
     }
 
     @Override
-    public String toString() {
+    public String positionToString() {
         return Long.toString(offset);
     }
+
+    @Override
+    public String toString() {
+        return positionToString();
+    }
 }


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message