You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@labs.apache.org by ps...@apache.org on 2007/10/16 05:41:56 UTC

svn commit: r585020 - /labs/pinpoint/trunk/pinpoint-search/src/main/java/org/apache/logging/pinpoint/search/PinpointSearchResults.java

Author: psmith
Date: Mon Oct 15 20:41:55 2007
New Revision: 585020

URL: http://svn.apache.org/viewvc?rev=585020&view=rev
Log:
Minor debug output improvements.

Modified:
    labs/pinpoint/trunk/pinpoint-search/src/main/java/org/apache/logging/pinpoint/search/PinpointSearchResults.java

Modified: labs/pinpoint/trunk/pinpoint-search/src/main/java/org/apache/logging/pinpoint/search/PinpointSearchResults.java
URL: http://svn.apache.org/viewvc/labs/pinpoint/trunk/pinpoint-search/src/main/java/org/apache/logging/pinpoint/search/PinpointSearchResults.java?rev=585020&r1=585019&r2=585020&view=diff
==============================================================================
--- labs/pinpoint/trunk/pinpoint-search/src/main/java/org/apache/logging/pinpoint/search/PinpointSearchResults.java (original)
+++ labs/pinpoint/trunk/pinpoint-search/src/main/java/org/apache/logging/pinpoint/search/PinpointSearchResults.java Mon Oct 15 20:41:55 2007
@@ -21,16 +21,18 @@
 // TODO test cases for this, because I _alway_ screw up pagination
 
 /**
- * Container bean that holds the event location keys for a given search result, with pagination
- * support. This class does not hold the events themselves, just the locations in the
- * {@link EventStore} in the order in which they were returned from the search. Implementation Note:
- * It _could_ be valid to have a <code>null</code> event location row because if an event was not
- * able to be retrieved, rather than prevent ALL read access for that query, usesrs of this data
- * should handle this condition gracefully.
+ * Container bean that holds the event location keys for a given search result,
+ * with pagination support. This class does not hold the events themselves, just
+ * the locations in the {@link EventStore} in the order in which they were
+ * returned from the search. Implementation Note: It _could_ be valid to have a
+ * <code>null</code> event location row because if an event was not able to be
+ * retrieved, rather than prevent ALL read access for that query, usesrs of this
+ * data should handle this condition gracefully.
  */
 public class PinpointSearchResults {
 
-    private static Logger LOG = PinpointUtils.getLogger(PinpointSearchUtils.class);
+    private static Logger LOG = PinpointUtils
+            .getLogger(PinpointSearchUtils.class);
 
     private static final int DEFAULT_PAGE_SIZE = 25;
     private final List<String> results;
@@ -114,7 +116,9 @@
 
     @Override
     public String toString() {
-        return ToStringBuilder.reflectionToString(this);
+        return new ToStringBuilder(this).append("size", this.results.size())
+                .append("currentPage", this.currentPage).append("numPages",
+                        this.lastPage).toString();
     }
 
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@labs.apache.org
For additional commands, e-mail: commits-help@labs.apache.org