nifi git commit: NIFI-1955: Deprecate IntegerHolder, LongHolder, BooleanHolder
Repository: nifi Updated Branches: refs/heads/0.x ff4b91e70 -> f8ae10f75 NIFI-1955: Deprecate IntegerHolder, LongHolder, BooleanHolder This closes #537 Project: http://git-wip-us.apache.org/repos/asf/nifi/repo Commit: http://git-wip-us.apache.org/repos/asf/nifi/commit/f8ae10f7 Tree: http://git-wip-us.apache.org/repos/asf/nifi/tree/f8ae10f7 Diff: http://git-wip-us.apache.org/repos/asf/nifi/diff/f8ae10f7 Branch: refs/heads/0.x Commit: f8ae10f75aa6308c5a5c70523e2362248a4b0023 Parents: ff4b91e Author: Joshi Authored: Thu Jun 16 19:49:00 2016 -0700 Committer: Oleg Zhurakousky Committed: Fri Jun 17 12:34:54 2016 -0400 -- .../java/org/apache/nifi/util/BooleanHolder.java | 12 .../java/org/apache/nifi/util/IntegerHolder.java | 15 --- .../main/java/org/apache/nifi/util/LongHolder.java | 9 - 3 files changed, 32 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/nifi/blob/f8ae10f7/nifi-commons/nifi-utils/src/main/java/org/apache/nifi/util/BooleanHolder.java -- diff --git a/nifi-commons/nifi-utils/src/main/java/org/apache/nifi/util/BooleanHolder.java b/nifi-commons/nifi-utils/src/main/java/org/apache/nifi/util/BooleanHolder.java index 92061e0..8283389 100644 --- a/nifi-commons/nifi-utils/src/main/java/org/apache/nifi/util/BooleanHolder.java +++ b/nifi-commons/nifi-utils/src/main/java/org/apache/nifi/util/BooleanHolder.java @@ -16,6 +16,18 @@ */ package org.apache.nifi.util; +import java.util.concurrent.atomic.AtomicBoolean; + +/** + * @deprecated As of release 1.0.1. Please use {@link AtomicBoolean} + * + * Wraps an Boolean value so that it can be declared final and still be accessed from inner classes; + * the functionality is similar to that of an AtomicBoolean, but operations on this class + * are not atomic. This results in greater performance when the atomicity is not needed. + * + */ + +@Deprecated public class BooleanHolder extends ObjectHolder { public BooleanHolder(final boolean initialValue) { http://git-wip-us.apache.org/repos/asf/nifi/blob/f8ae10f7/nifi-commons/nifi-utils/src/main/java/org/apache/nifi/util/IntegerHolder.java -- diff --git a/nifi-commons/nifi-utils/src/main/java/org/apache/nifi/util/IntegerHolder.java b/nifi-commons/nifi-utils/src/main/java/org/apache/nifi/util/IntegerHolder.java index 213bbc0..8abfdb1 100644 --- a/nifi-commons/nifi-utils/src/main/java/org/apache/nifi/util/IntegerHolder.java +++ b/nifi-commons/nifi-utils/src/main/java/org/apache/nifi/util/IntegerHolder.java @@ -16,6 +16,18 @@ */ package org.apache.nifi.util; +import java.util.concurrent.atomic.AtomicInteger; + +/** + * @deprecated As of release 1.0.1. Please use {@link AtomicInteger} + * + * Wraps an Integer value so that it can be declared final and still be accessed from inner classes; + * the functionality is similar to that of an AtomicInteger, but operations on this class + * are not atomic. This results in greater performance when the atomicity is not needed. + * + */ + +@Deprecated public class IntegerHolder extends ObjectHolder { public IntegerHolder(final int initialValue) { @@ -48,7 +60,4 @@ public class IntegerHolder extends ObjectHolder { return addAndGet(-1); } -public int getAndDecrement() { -return getAndAdd(-1); -} } http://git-wip-us.apache.org/repos/asf/nifi/blob/f8ae10f7/nifi-commons/nifi-utils/src/main/java/org/apache/nifi/util/LongHolder.java -- diff --git a/nifi-commons/nifi-utils/src/main/java/org/apache/nifi/util/LongHolder.java b/nifi-commons/nifi-utils/src/main/java/org/apache/nifi/util/LongHolder.java index fa2d063..723463a 100644 --- a/nifi-commons/nifi-utils/src/main/java/org/apache/nifi/util/LongHolder.java +++ b/nifi-commons/nifi-utils/src/main/java/org/apache/nifi/util/LongHolder.java @@ -16,10 +16,17 @@ */ package org.apache.nifi.util; +import java.util.concurrent.atomic.AtomicLong; + /** - * Wraps a Long value so that it can be declared final and still be accessed from which inner classes; the functionality is similar to that of an AtomicLong, but operations on this class + * @deprecated As of release 1.0.1. Please use {@link AtomicLong} + * + * Wraps a Long value so that it can be declared final and still be accessed from inner classes; + * the functionality is similar to that of an AtomicLong, but operations on this class * are not atomic. This results in greater performance when the atomicity is not needed. */ + +@Deprecated public class LongHolder extends ObjectHolder { public LongHolder(final long initialValue) {
nifi git commit: NIFI-1955: Deprecate IntegerHolder, LongHolder, BooleanHolder
Repository: nifi Updated Branches: refs/heads/master 541bbc093 -> 548561ed4 NIFI-1955: Deprecate IntegerHolder, LongHolder, BooleanHolder This closes #537 Project: http://git-wip-us.apache.org/repos/asf/nifi/repo Commit: http://git-wip-us.apache.org/repos/asf/nifi/commit/548561ed Tree: http://git-wip-us.apache.org/repos/asf/nifi/tree/548561ed Diff: http://git-wip-us.apache.org/repos/asf/nifi/diff/548561ed Branch: refs/heads/master Commit: 548561ed4ca54cb655b072aa7536249da88b1abf Parents: 541bbc0 Author: Joshi Authored: Thu Jun 16 19:49:00 2016 -0700 Committer: Oleg Zhurakousky Committed: Fri Jun 17 12:32:53 2016 -0400 -- .../java/org/apache/nifi/util/BooleanHolder.java | 12 .../java/org/apache/nifi/util/IntegerHolder.java | 15 --- .../main/java/org/apache/nifi/util/LongHolder.java | 9 - 3 files changed, 32 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/nifi/blob/548561ed/nifi-commons/nifi-utils/src/main/java/org/apache/nifi/util/BooleanHolder.java -- diff --git a/nifi-commons/nifi-utils/src/main/java/org/apache/nifi/util/BooleanHolder.java b/nifi-commons/nifi-utils/src/main/java/org/apache/nifi/util/BooleanHolder.java index 92061e0..8283389 100644 --- a/nifi-commons/nifi-utils/src/main/java/org/apache/nifi/util/BooleanHolder.java +++ b/nifi-commons/nifi-utils/src/main/java/org/apache/nifi/util/BooleanHolder.java @@ -16,6 +16,18 @@ */ package org.apache.nifi.util; +import java.util.concurrent.atomic.AtomicBoolean; + +/** + * @deprecated As of release 1.0.1. Please use {@link AtomicBoolean} + * + * Wraps an Boolean value so that it can be declared final and still be accessed from inner classes; + * the functionality is similar to that of an AtomicBoolean, but operations on this class + * are not atomic. This results in greater performance when the atomicity is not needed. + * + */ + +@Deprecated public class BooleanHolder extends ObjectHolder { public BooleanHolder(final boolean initialValue) { http://git-wip-us.apache.org/repos/asf/nifi/blob/548561ed/nifi-commons/nifi-utils/src/main/java/org/apache/nifi/util/IntegerHolder.java -- diff --git a/nifi-commons/nifi-utils/src/main/java/org/apache/nifi/util/IntegerHolder.java b/nifi-commons/nifi-utils/src/main/java/org/apache/nifi/util/IntegerHolder.java index 213bbc0..8abfdb1 100644 --- a/nifi-commons/nifi-utils/src/main/java/org/apache/nifi/util/IntegerHolder.java +++ b/nifi-commons/nifi-utils/src/main/java/org/apache/nifi/util/IntegerHolder.java @@ -16,6 +16,18 @@ */ package org.apache.nifi.util; +import java.util.concurrent.atomic.AtomicInteger; + +/** + * @deprecated As of release 1.0.1. Please use {@link AtomicInteger} + * + * Wraps an Integer value so that it can be declared final and still be accessed from inner classes; + * the functionality is similar to that of an AtomicInteger, but operations on this class + * are not atomic. This results in greater performance when the atomicity is not needed. + * + */ + +@Deprecated public class IntegerHolder extends ObjectHolder { public IntegerHolder(final int initialValue) { @@ -48,7 +60,4 @@ public class IntegerHolder extends ObjectHolder { return addAndGet(-1); } -public int getAndDecrement() { -return getAndAdd(-1); -} } http://git-wip-us.apache.org/repos/asf/nifi/blob/548561ed/nifi-commons/nifi-utils/src/main/java/org/apache/nifi/util/LongHolder.java -- diff --git a/nifi-commons/nifi-utils/src/main/java/org/apache/nifi/util/LongHolder.java b/nifi-commons/nifi-utils/src/main/java/org/apache/nifi/util/LongHolder.java index fa2d063..723463a 100644 --- a/nifi-commons/nifi-utils/src/main/java/org/apache/nifi/util/LongHolder.java +++ b/nifi-commons/nifi-utils/src/main/java/org/apache/nifi/util/LongHolder.java @@ -16,10 +16,17 @@ */ package org.apache.nifi.util; +import java.util.concurrent.atomic.AtomicLong; + /** - * Wraps a Long value so that it can be declared final and still be accessed from which inner classes; the functionality is similar to that of an AtomicLong, but operations on this class + * @deprecated As of release 1.0.1. Please use {@link AtomicLong} + * + * Wraps a Long value so that it can be declared final and still be accessed from inner classes; + * the functionality is similar to that of an AtomicLong, but operations on this class * are not atomic. This results in greater performance when the atomicity is not needed. */ + +@Deprecated public class LongHolder extends ObjectHolder { public LongHolder(final long initialValue) {