-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deprecate
org.wildfly.common.ref
in favor of SmallRye
Fixes #98
- Loading branch information
Showing
10 changed files
with
31 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,6 +18,7 @@ | |
|
||
package org.wildfly.common.ref; | ||
|
||
import java.lang.ref.Cleaner; | ||
import java.util.Collections; | ||
import java.util.Set; | ||
import java.util.concurrent.ConcurrentHashMap; | ||
|
@@ -26,7 +27,10 @@ | |
* A special version of {@link PhantomReference} that is strongly retained until it is reaped by the collection thread. | ||
* | ||
* @author <a href="mailto:[email protected]">David M. Lloyd</a> | ||
* | ||
* @deprecated Use {@link Cleaner} or {@link io.smallrye.common.ref.CleanerReference} instead. | ||
*/ | ||
@Deprecated(forRemoval = true) | ||
public class CleanerReference<T, A> extends PhantomReference<T, A> { | ||
private static final Set<CleanerReference<?, ?>> set = Collections.newSetFromMap(new ConcurrentHashMap<CleanerReference<?, ?>, Boolean>()); | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,7 +30,10 @@ | |
* @see java.lang.ref.PhantomReference | ||
* | ||
* @author <a href="mailto:[email protected]">David M. Lloyd</a> | ||
* | ||
* @deprecated Use {@link io.smallrye.common.ref.PhantomReference} instead. | ||
*/ | ||
@Deprecated(forRemoval = true) | ||
public class PhantomReference<T, A> extends java.lang.ref.PhantomReference<T> implements Reference<T, A>, Reapable<T, A> { | ||
private final A attachment; | ||
private final Reaper<T, A> reaper; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,7 +25,10 @@ | |
* @param <A> the reference attachment type | ||
* | ||
* @author <a href="mailto:[email protected]">David M. Lloyd</a> | ||
* | ||
* @deprecated Use {@link io.smallrye.common.ref.Reaper} instead. | ||
*/ | ||
@Deprecated(forRemoval = true) | ||
public interface Reaper<T, A> { | ||
|
||
/** | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,7 +29,10 @@ | |
* @see java.lang.ref.Reference | ||
* | ||
* @author <a href="mailto:[email protected]">David M. Lloyd</a> | ||
* | ||
* @deprecated Use {@link io.smallrye.common.ref.Reference} instead. | ||
*/ | ||
@Deprecated(forRemoval = true) | ||
public interface Reference<T, A> { | ||
|
||
/** | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,6 +30,8 @@ | |
* @see java.lang.ref.SoftReference | ||
* | ||
* @author <a href="mailto:[email protected]">David M. Lloyd</a> | ||
* | ||
* @deprecated Use {@link io.smallrye.common.ref.SoftReference} instead. | ||
*/ | ||
public class SoftReference<T, A> extends java.lang.ref.SoftReference<T> implements Reference<T, A>, Reapable<T, A> { | ||
private final A attachment; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,7 +25,10 @@ | |
* @param <A> the attachment type | ||
* | ||
* @author <a href="mailto:[email protected]">David M. Lloyd</a> | ||
* | ||
* @deprecated Use {@link io.smallrye.common.ref.StrongReference} instead. | ||
*/ | ||
@Deprecated(forRemoval = true) | ||
public class StrongReference<T, A> implements Reference<T, A> { | ||
|
||
private volatile T referent; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,7 +30,10 @@ | |
* @see java.lang.ref.WeakReference | ||
* | ||
* @author <a href="mailto:[email protected]">David M. Lloyd</a> | ||
* | ||
* @deprecated Use {@link io.smallrye.common.ref.WeakReference} instead. | ||
*/ | ||
@Deprecated(forRemoval = true) | ||
public class WeakReference<T, A> extends java.lang.ref.WeakReference<T> implements Reference<T, A>, Reapable<T, A> { | ||
private final A attachment; | ||
private final Reaper<T, A> reaper; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters