@Immutable public final class ReferrerCounts extends Object
Modifier and Type | Class and Description |
---|---|
static class |
ReferrerCounts.MutableReferrerCounts |
Modifier | Constructor and Description |
---|---|
protected |
ReferrerCounts(Map<NodeKey,Integer> strongCountsByReferrerKey,
Map<NodeKey,Integer> weakCountsByReferrerKey) |
Modifier and Type | Method and Description |
---|---|
protected static int |
count(Integer count) |
int |
countStrongReferencesFrom(NodeKey referrer)
Get the number of strong references of a particular referring node.
|
int |
countWeakReferencesFrom(NodeKey referrer)
Get the number of weak references of a particular referring node.
|
static ReferrerCounts |
create(Map<NodeKey,Integer> strongCountsByReferrerKey,
Map<NodeKey,Integer> weakCountsByReferrerKey)
Create a new instance of the snapshot.
|
static ReferrerCounts.MutableReferrerCounts |
createMutable() |
Set<NodeKey> |
getStrongReferrers()
Get the set of node keys to the nodes with strong references.
|
Set<NodeKey> |
getWeakReferrers()
Get the set of node keys to the nodes with weak references.
|
ReferrerCounts.MutableReferrerCounts |
mutable()
Get a mutable version of this snapshot.
|
public static ReferrerCounts create(Map<NodeKey,Integer> strongCountsByReferrerKey, Map<NodeKey,Integer> weakCountsByReferrerKey)
strongCountsByReferrerKey
- the map of weak reference counts keyed by referrer's node keys; may be null or emptyweakCountsByReferrerKey
- the map of weak reference counts keyed by referrer's node keys; may be null or emptypublic static ReferrerCounts.MutableReferrerCounts createMutable()
protected static int count(Integer count)
public Set<NodeKey> getStrongReferrers()
public Set<NodeKey> getWeakReferrers()
public int countStrongReferencesFrom(NodeKey referrer)
referrer
- the referring nodereferrer
is nullpublic int countWeakReferencesFrom(NodeKey referrer)
referrer
- the referring nodereferrer
is nullpublic ReferrerCounts.MutableReferrerCounts mutable()
Copyright © 2008–2016 JBoss, a division of Red Hat. All rights reserved.