ace-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1301609 - in /ace/trunk/ace-server-log-store/src: main/java/org/apache/ace/server/log/store/LogStore.java test/java/org/apache/ace/server/log/store/impl/ServerLogStoreTester.java
Date Fri, 16 Mar 2012 16:05:31 GMT
Author: marrs
Date: Fri Mar 16 16:05:30 2012
New Revision: 1301609

URL: http://svn.apache.org/viewvc?rev=1301609&view=rev
Log:
ACE-63 getting close

Modified:
    ace/trunk/ace-server-log-store/src/main/java/org/apache/ace/server/log/store/LogStore.java
    ace/trunk/ace-server-log-store/src/test/java/org/apache/ace/server/log/store/impl/ServerLogStoreTester.java

Modified: ace/trunk/ace-server-log-store/src/main/java/org/apache/ace/server/log/store/LogStore.java
URL: http://svn.apache.org/viewvc/ace/trunk/ace-server-log-store/src/main/java/org/apache/ace/server/log/store/LogStore.java?rev=1301609&r1=1301608&r2=1301609&view=diff
==============================================================================
--- ace/trunk/ace-server-log-store/src/main/java/org/apache/ace/server/log/store/LogStore.java
(original)
+++ ace/trunk/ace-server-log-store/src/main/java/org/apache/ace/server/log/store/LogStore.java
Fri Mar 16 16:05:30 2012
@@ -58,12 +58,12 @@ public interface LogStore
     /**
      * Get the range for the given id and the given log.
      *
-     * @param gatewayID the id for which to return the log range.
+     * @param targetID the id for which to return the log range.
      * @param logID the log id for which to return the range.
      * @return the range for the given id and the given log.
      * @throws java.io.IOException in case of any error.
      */
-    public LogDescriptor getDescriptor(String gatewayID, long logID) throws IOException;
+    public LogDescriptor getDescriptor(String targetID, long logID) throws IOException;
 
     /**
      * Store the given events. The implementation does not have to be transactional i.e.,
it might throw an exception and still
@@ -77,11 +77,11 @@ public interface LogStore
     /**
      * Get the ranges of all logs of the given id.
      *
-     * @param gatewayID the id for which to return the log ranges.
+     * @param targetID the id for which to return the log ranges.
      * @return a list of the ranges of all logs for the given id.
      * @throws java.io.IOException in case of any error.
      */
-    public List<LogDescriptor> getDescriptors(String gatewayID) throws IOException;
+    public List<LogDescriptor> getDescriptors(String targetID) throws IOException;
 
     /**
      * Get the ranges of all logs of all ids in this store.

Modified: ace/trunk/ace-server-log-store/src/test/java/org/apache/ace/server/log/store/impl/ServerLogStoreTester.java
URL: http://svn.apache.org/viewvc/ace/trunk/ace-server-log-store/src/test/java/org/apache/ace/server/log/store/impl/ServerLogStoreTester.java?rev=1301609&r1=1301608&r2=1301609&view=diff
==============================================================================
--- ace/trunk/ace-server-log-store/src/test/java/org/apache/ace/server/log/store/impl/ServerLogStoreTester.java
(original)
+++ ace/trunk/ace-server-log-store/src/test/java/org/apache/ace/server/log/store/impl/ServerLogStoreTester.java
Fri Mar 16 16:05:30 2012
@@ -62,10 +62,10 @@ public class ServerLogStoreTester {
         List<LogDescriptor> ranges = m_logStore.getDescriptors();
         assert ranges.isEmpty() : "New store should have no ranges.";
         List<LogEvent> events = new ArrayList<LogEvent>();
-        for (String gateway : new String[] { "g1", "g2", "g3" }) {
+        for (String target : new String[] { "g1", "g2", "g3" }) {
             for (long log : new long[] { 1, 2, 3, 5 }) {
                 for (long id : new long[] { 1, 2, 3, 20 }) {
-                    events.add(new LogEvent(gateway, log, id, System.currentTimeMillis(),
AuditEvent.FRAMEWORK_STARTED, new Properties() {
+                    events.add(new LogEvent(target, log, id, System.currentTimeMillis(),
AuditEvent.FRAMEWORK_STARTED, new Properties() {
                         {
                             put("test", "bar");
                         }
@@ -95,13 +95,13 @@ public class ServerLogStoreTester {
 
     @Test( groups = { TestUtils.UNIT } )
     public void testLogWithSpecialCharacters() throws IOException {
-        String gatewayID = "myga\0teway";
-        LogEvent event = new LogEvent(gatewayID, 1, 1, System.currentTimeMillis(), AuditEvent.FRAMEWORK_STARTED,
new Properties());
+        String targetID = "myta\0rget";
+        LogEvent event = new LogEvent(targetID, 1, 1, System.currentTimeMillis(), AuditEvent.FRAMEWORK_STARTED,
new Properties());
         List<LogEvent> events = new ArrayList<LogEvent>();
         events.add(event);
         m_logStore.put(events);
         assert m_logStore.getDescriptors().size() == 1 : "Incorrect amount of ranges returned
from store: expected 1, found " + m_logStore.getDescriptors().size();
-        assert m_logStore.getDescriptors(gatewayID).size() == 1 : "We expect to find a single
event: expected 1, found " + m_logStore.getDescriptors(gatewayID).size();
+        assert m_logStore.getDescriptors(targetID).size() == 1 : "We expect to find a single
event: expected 1, found " + m_logStore.getDescriptors(targetID).size();
     }
 
     private void delete(File root) {



Mime
View raw message