public int invalidateRowCache(Collection<Bounds<Token>> boundsToInvalidate) { int invalidatedKeys = 0; for (Iterator<RowCacheKey> keyIter = CacheService.instance.rowCache.keyIterator(); keyIter.hasNext(); ) { RowCacheKey key = keyIter.next(); DecoratedKey dk = decorateKey(ByteBuffer.wrap(key.key)); if (key.ksAndCFName.equals(metadata.ksAndCFName) && Bounds.isInBounds(dk.getToken(), boundsToInvalidate)) { invalidateCachedPartition(dk); invalidatedKeys++; } } return invalidatedKeys; }
public int invalidateRowCache(Collection<Bounds<Token>> boundsToInvalidate) { int invalidatedKeys = 0; for (Iterator<RowCacheKey> keyIter = CacheService.instance.rowCache.keyIterator(); keyIter.hasNext(); ) { RowCacheKey key = keyIter.next(); DecoratedKey dk = decorateKey(ByteBuffer.wrap(key.key)); if (key.ksAndCFName.equals(metadata.ksAndCFName) && Bounds.isInBounds(dk.getToken(), boundsToInvalidate)) { invalidateCachedPartition(dk); invalidatedKeys++; } } return invalidatedKeys; }
public int invalidateCounterCache(Collection<Bounds<Token>> boundsToInvalidate) { int invalidatedKeys = 0; for (Iterator<CounterCacheKey> keyIter = CacheService.instance.counterCache.keyIterator(); keyIter.hasNext(); ) { CounterCacheKey key = keyIter.next(); DecoratedKey dk = decorateKey(ByteBuffer.wrap(key.partitionKey)); if (key.ksAndCFName.equals(metadata.ksAndCFName) && Bounds.isInBounds(dk.getToken(), boundsToInvalidate)) { CacheService.instance.counterCache.remove(key); invalidatedKeys++; } } return invalidatedKeys; }
public int invalidateCounterCache(Collection<Bounds<Token>> boundsToInvalidate) { int invalidatedKeys = 0; for (Iterator<CounterCacheKey> keyIter = CacheService.instance.counterCache.keyIterator(); keyIter.hasNext(); ) { CounterCacheKey key = keyIter.next(); DecoratedKey dk = decorateKey(ByteBuffer.wrap(key.partitionKey)); if (key.ksAndCFName.equals(metadata.ksAndCFName) && Bounds.isInBounds(dk.getToken(), boundsToInvalidate)) { CacheService.instance.counterCache.remove(key); invalidatedKeys++; } } return invalidatedKeys; }
public int invalidateRowCache(Collection<Bounds<Token>> boundsToInvalidate) { int invalidatedKeys = 0; for (Iterator<RowCacheKey> keyIter = CacheService.instance.rowCache.keyIterator(); keyIter.hasNext(); ) { RowCacheKey key = keyIter.next(); DecoratedKey dk = decorateKey(ByteBuffer.wrap(key.key)); if (key.ksAndCFName.equals(metadata.ksAndCFName) && Bounds.isInBounds(dk.getToken(), boundsToInvalidate)) { invalidateCachedPartition(dk); invalidatedKeys++; } } return invalidatedKeys; }
public int invalidateCounterCache(Collection<Bounds<Token>> boundsToInvalidate) { int invalidatedKeys = 0; for (Iterator<CounterCacheKey> keyIter = CacheService.instance.counterCache.keyIterator(); keyIter.hasNext(); ) { CounterCacheKey key = keyIter.next(); DecoratedKey dk = decorateKey(ByteBuffer.wrap(key.partitionKey)); if (key.ksAndCFName.equals(metadata.ksAndCFName) && Bounds.isInBounds(dk.getToken(), boundsToInvalidate)) { CacheService.instance.counterCache.remove(key); invalidatedKeys++; } } return invalidatedKeys; }
public int invalidateCounterCache(Collection<Bounds<Token>> boundsToInvalidate) { int invalidatedKeys = 0; for (CounterCacheKey key : CacheService.instance.counterCache.getKeySet()) { DecoratedKey dk = partitioner.decorateKey(ByteBuffer.wrap(key.partitionKey)); if (key.ksAndCFName.equals(metadata.ksAndCFName) && Bounds.isInBounds(dk.getToken(), boundsToInvalidate)) { CacheService.instance.counterCache.remove(key); invalidatedKeys++; } } return invalidatedKeys; }
public int invalidateRowCache(Collection<Bounds<Token>> boundsToInvalidate) { int invalidatedKeys = 0; for (RowCacheKey key : CacheService.instance.rowCache.getKeySet()) { DecoratedKey dk = partitioner.decorateKey(ByteBuffer.wrap(key.key)); if (key.ksAndCFName.equals(metadata.ksAndCFName) && Bounds.isInBounds(dk.getToken(), boundsToInvalidate)) { invalidateCachedRow(dk); invalidatedKeys++; } } return invalidatedKeys; }