@Test public void remove() { mBucketList.insert(BUCKET1_FILE1); mBucketList.insert(BUCKET1_FILE2); mBucketList.insert(BUCKET2_FILE); List<TtlBucket> expired = getSortedExpiredBuckets(BUCKET1_END); assertExpired(expired, 0, BUCKET1_FILE1, BUCKET1_FILE2); mBucketList.remove(BUCKET1_FILE1); expired = getSortedExpiredBuckets(BUCKET1_END); assertExpired(expired, 0, BUCKET1_FILE2); mBucketList.remove(BUCKET1_FILE2); expired = getSortedExpiredBuckets(BUCKET1_END); assertExpired(expired, 0); expired = getSortedExpiredBuckets(BUCKET2_END); assertExpired(expired, 0); assertExpired(expired, 1, BUCKET2_FILE); expired = getSortedExpiredBuckets(BUCKET1_END); mBucketList.removeBuckets(Sets.newHashSet(expired)); expired = getSortedExpiredBuckets(BUCKET2_END); assertExpired(expired, 0, BUCKET2_FILE); mBucketList.remove(BUCKET2_FILE); expired = getSortedExpiredBuckets(BUCKET2_END); assertExpired(expired, 0); mBucketList.removeBuckets(Sets.newHashSet(expired)); expired = getSortedExpiredBuckets(BUCKET2_END); Assert.assertEquals(0, expired.size()); }
public void remove(InodeView inode) { TtlBucket bucket = getBucketContaining(inode); if (bucket != null) { bucket.removeInode(inode); } }
TtlBucketList implements Checkpointed { public void remove(InodeView inode) { TtlBucket bucket = getBucketContaining(inode); if (bucket != null) { bucket.removeInode(inode); } } }
TtlBucketList implements Checkpointed { public void remove(InodeView inode) { TtlBucket bucket = getBucketContaining(inode); if (bucket != null) { bucket.removeInode(inode); } } TtlBucketList(ReadOnlyInodeStore inodeStore); }
TtlBucketList implements Checkpointed { public void remove(InodeView inode) { TtlBucket bucket = getBucketContaining(inode); if (bucket != null) { bucket.removeInode(inode); } } TtlBucketList(ReadOnlyInodeStore inodeStore); void insert(Inode inode); void remove(InodeView inode); Set<TtlBucket> getExpiredBuckets(long time); void removeBuckets(Set<TtlBucket> buckets); @Override CheckpointName getCheckpointName(); @Override void writeToCheckpoint(OutputStream output); @Override void restoreFromCheckpoint(CheckpointInputStream input); }
TtlBucketList implements Checkpointed { public void remove(InodeView inode) { TtlBucket bucket = getBucketContaining(inode); if (bucket != null) { bucket.removeInode(inode); } } TtlBucketList(ReadOnlyInodeStore inodeStore); void insert(Inode inode); void remove(InodeView inode); Set<TtlBucket> getExpiredBuckets(long time); void removeBuckets(Set<TtlBucket> buckets); @Override CheckpointName getCheckpointName(); @Override void writeToCheckpoint(OutputStream output); @Override void restoreFromCheckpoint(CheckpointInputStream input);  }