You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2019/08/27 05:18:06 UTC
[commons-dbcp] branch master updated: Sort members.
This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-dbcp.git
The following commit(s) were added to refs/heads/master by this push:
new ed85c04 Sort members.
ed85c04 is described below
commit ed85c0411dffeb96af4760b5b5c269a21b98c392
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Tue Aug 27 01:18:01 2019 -0400
Sort members.
---
.../org/apache/commons/dbcp2/AbandonedTrace.java | 92 +++++++++++-----------
1 file changed, 46 insertions(+), 46 deletions(-)
diff --git a/src/main/java/org/apache/commons/dbcp2/AbandonedTrace.java b/src/main/java/org/apache/commons/dbcp2/AbandonedTrace.java
index a00593c..c53428b 100644
--- a/src/main/java/org/apache/commons/dbcp2/AbandonedTrace.java
+++ b/src/main/java/org/apache/commons/dbcp2/AbandonedTrace.java
@@ -58,45 +58,6 @@ public class AbandonedTrace implements TrackedUse {
}
/**
- * Initializes abandoned tracing for this object.
- *
- * @param parent
- * AbandonedTrace parent object.
- */
- private void init(final AbandonedTrace parent) {
- if (parent != null) {
- parent.addTrace(this);
- }
- }
-
- /**
- * Gets the last time this object was used in milliseconds.
- *
- * @return long time in milliseconds.
- */
- @Override
- public long getLastUsed() {
- return lastUsedMillis;
- }
-
- /**
- * Sets the time this object was last used to the current time in milliseconds.
- */
- protected void setLastUsed() {
- lastUsedMillis = System.currentTimeMillis();
- }
-
- /**
- * Sets the time in milliseconds this object was last used.
- *
- * @param lastUsedMillis
- * time in milliseconds.
- */
- protected void setLastUsed(final long lastUsedMillis) {
- this.lastUsedMillis = lastUsedMillis;
- }
-
- /**
* Adds an object to the list of objects being traced.
*
* @param trace
@@ -119,6 +80,16 @@ public class AbandonedTrace implements TrackedUse {
}
/**
+ * Gets the last time this object was used in milliseconds.
+ *
+ * @return long time in milliseconds.
+ */
+ @Override
+ public long getLastUsed() {
+ return lastUsedMillis;
+ }
+
+ /**
* Gets a list of objects being traced by this object.
*
* @return List of objects.
@@ -145,6 +116,30 @@ public class AbandonedTrace implements TrackedUse {
}
/**
+ * Initializes abandoned tracing for this object.
+ *
+ * @param parent
+ * AbandonedTrace parent object.
+ */
+ private void init(final AbandonedTrace parent) {
+ if (parent != null) {
+ parent.addTrace(this);
+ }
+ }
+
+ /**
+ * Removes this object the source object is tracing.
+ *
+ * @param source The object tracing
+ * @since 2.7.0
+ */
+ protected void removeThisTrace(final Object source) {
+ if (source instanceof AbandonedTrace) {
+ AbandonedTrace.class.cast(source).removeTrace(this);
+ }
+ }
+
+ /**
* Removes a child object this object is tracing.
*
* @param trace
@@ -167,14 +162,19 @@ public class AbandonedTrace implements TrackedUse {
}
/**
- * Removes this object the source object is tracing.
+ * Sets the time this object was last used to the current time in milliseconds.
+ */
+ protected void setLastUsed() {
+ lastUsedMillis = System.currentTimeMillis();
+ }
+
+ /**
+ * Sets the time in milliseconds this object was last used.
*
- * @param source The object tracing
- * @since 2.7.0
+ * @param lastUsedMillis
+ * time in milliseconds.
*/
- protected void removeThisTrace(final Object source) {
- if (source instanceof AbandonedTrace) {
- AbandonedTrace.class.cast(source).removeTrace(this);
- }
+ protected void setLastUsed(final long lastUsedMillis) {
+ this.lastUsedMillis = lastUsedMillis;
}
}