/** * Current count of elements in the set. Due to concurrent racing updates, * the size is only ever approximate. Updates due to the calling thread are * immediately visible to calling thread. * @return count of elements. */ public int size ( ) { return _map.size(); } /** Empty the set. */
/** * Current count of elements in the set. Due to concurrent racing updates, * the size is only ever approximate. Updates due to the calling thread are * immediately visible to calling thread. * @return count of elements. */ public int size ( ) { return _map.size(); } /** Empty the set. */
/** * Returns <tt>size() == 0</tt>. * * @return <tt>size() == 0</tt> */ @Override public boolean isEmpty() { return size() == 0; }
/** Returns <tt>size() == 0</tt>. * @return <tt>size() == 0</tt> */ @Override public boolean isEmpty ( ) { return size() == 0; }
@Override public int getPartitionCount() { return tokenToPartitionMap.size(); }
/** * Current count of elements in the set. Due to concurrent racing updates, * the size is only ever approximate. Updates due to the calling thread are * immediately visible to calling thread. * @return count of elements. */ public int size ( ) { return _map.size(); } /** Empty the set. */
@Override public int getPartitionCount() { return tokenToPartitionMap.size(); }
/** Returns <tt>size() == 0</tt>. * @return <tt>size() == 0</tt> */ @Override public boolean isEmpty ( ) { return size() == 0; }
@Override public int size() { return NonBlockingHashMap.this.size(); }
@Override public int size() { return NonBlockingHashMap.this.size(); }
/** Returns <tt>size() == 0</tt>. * @return <tt>size() == 0</tt> */ @Override public boolean isEmpty ( ) { return size() == 0; }
@Override public int size ( ) { return NonBlockingHashMap.this.size ( ); } @Override public boolean contains( Object k ) { return NonBlockingHashMap.this.containsKey(k); }
@Override public int size ( ) { return NonBlockingHashMap.this.size ( ); } @Override public boolean contains( Object v ) { return NonBlockingHashMap.this.containsValue(v); }
@Override public int size ( ) { return NonBlockingHashMap.this.size ( ); } @Override public boolean contains( Object k ) { return NonBlockingHashMap.this.containsKey(k); }
@Override public int size ( ) { return NonBlockingHashMap.this.size ( ); } @Override public boolean contains( Object v ) { return NonBlockingHashMap.this.containsValue(v); }
@Override public int size ( ) { return NonBlockingHashMap.this.size ( ); } @Override public boolean contains( Object v ) { return NonBlockingHashMap.this.containsValue(v); }
@Override public int size ( ) { return NonBlockingHashMap.this.size ( ); } @Override public boolean contains( Object k ) { return NonBlockingHashMap.this.containsKey(k); }
/** * @return a collection of dirty CFIDs for this segment file. */ public synchronized Collection<UUID> getDirtyCFIDs() { if (cfClean.isEmpty() || cfDirty.isEmpty()) return cfDirty.keySet(); List<UUID> r = new ArrayList<>(cfDirty.size()); for (Map.Entry<UUID, IntegerInterval> dirty : cfDirty.entrySet()) { UUID cfId = dirty.getKey(); IntegerInterval dirtyInterval = dirty.getValue(); IntegerInterval.Set cleanSet = cfClean.get(cfId); if (cleanSet == null || !cleanSet.covers(dirtyInterval)) r.add(dirty.getKey()); } return r; }
/** * @return a collection of dirty CFIDs for this segment file. */ public synchronized Collection<UUID> getDirtyCFIDs() { if (cfClean.isEmpty() || cfDirty.isEmpty()) return cfDirty.keySet(); List<UUID> r = new ArrayList<>(cfDirty.size()); for (Map.Entry<UUID, IntegerInterval> dirty : cfDirty.entrySet()) { UUID cfId = dirty.getKey(); IntegerInterval dirtyInterval = dirty.getValue(); IntegerInterval.Set cleanSet = cfClean.get(cfId); if (cleanSet == null || !cleanSet.covers(dirtyInterval)) r.add(dirty.getKey()); } return r; }
/** * @return a collection of dirty CFIDs for this segment file. */ public synchronized Collection<UUID> getDirtyCFIDs() { if (cfClean.isEmpty() || cfDirty.isEmpty()) return cfDirty.keySet(); List<UUID> r = new ArrayList<>(cfDirty.size()); for (Map.Entry<UUID, IntegerInterval> dirty : cfDirty.entrySet()) { UUID cfId = dirty.getKey(); IntegerInterval dirtyInterval = dirty.getValue(); IntegerInterval.Set cleanSet = cfClean.get(cfId); if (cleanSet == null || !cleanSet.covers(dirtyInterval)) r.add(dirty.getKey()); } return r; }