// 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 sz = computeSize((TrieMap<K, V>) ct);
+ final int sz = computeSize(ct);
while (READ_SIZE () == -1) {
CAS_SIZE (-1, sz);
}
}
@Override
- public int cachedSize(final Object ct) {
+ int cachedSize(final TrieMap<K, V> ct) {
throw new UnsupportedOperationException();
}
}
@Override
- public int cachedSize(final Object ct) {
+ int cachedSize(final TrieMap<K, V> ct) {
return listmap.size();
}
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);
}
@Override
- public int cachedSize(final Object ct) {
+ int cachedSize(final TrieMap<K, V> ct) {
return 1;
}