These classes are not visible to the outside world, hence should
have package visibility. It should also take TrieMap as an argument,
thus eliminating the need for a cast in CNode's implementation.
Change-Id: I3995385fe8cb41bd0134ee1317c466cc1f2baaa9
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
// this should only be called from within read-only snapshots
@Override
// this should only be called from within read-only snapshots
@Override
- public int cachedSize(final Object ct) {
+ int cachedSize(final TrieMap<K, V> ct) {
final int currsz = READ_SIZE();
if (currsz != -1) {
return currsz;
}
final int currsz = READ_SIZE();
if (currsz != -1) {
return currsz;
}
- final int sz = computeSize((TrieMap<K, V>) ct);
+ final int sz = computeSize(ct);
while (READ_SIZE () == -1) {
CAS_SIZE (-1, sz);
}
while (READ_SIZE () == -1) {
CAS_SIZE (-1, sz);
}
- public int cachedSize(final Object ct) {
+ int cachedSize(final TrieMap<K, V> ct) {
throw new UnsupportedOperationException();
}
throw new UnsupportedOperationException();
}
- public int cachedSize(final Object ct) {
+ int cachedSize(final TrieMap<K, V> ct) {
public volatile MainNode<K, V> prev = null;
public volatile MainNode<K, V> prev = null;
- public abstract int cachedSize (Object ct);
+ abstract int cachedSize(TrieMap<K, V> ct);
public boolean CAS_PREV (final MainNode<K, V> oldval, final MainNode<K, V> nval) {
return updater.compareAndSet (this, oldval, nval);
public boolean CAS_PREV (final MainNode<K, V> oldval, final MainNode<K, V> nval) {
return updater.compareAndSet (this, oldval, nval);
- public int cachedSize(final Object ct) {
+ int cachedSize(final TrieMap<K, V> ct) {