@ThreadSafe public final class TtlBucket extends Object implements Comparable<TtlBucket>
PropertyKey.MASTER_TTL_CHECKER_INTERVAL_MS
.Constructor and Description |
---|
TtlBucket(long startTimeMs)
Creates a new instance of
TtlBucket . |
Modifier and Type | Method and Description |
---|---|
void |
addInode(Inode inode)
Adds a inode to the bucket.
|
int |
compareTo(TtlBucket ttlBucket)
Compares this bucket's TTL interval start time to that of another bucket.
|
boolean |
equals(Object o)
Compares to a specific object.
|
Collection<Inode> |
getInodes() |
long |
getTtlIntervalEndTimeMs() |
static long |
getTtlIntervalMs() |
long |
getTtlIntervalStartTimeMs() |
int |
hashCode()
Returns the hash code for the
TtlBucket . |
void |
removeInode(InodeView inode)
Removes a inode from the bucket.
|
public TtlBucket(long startTimeMs)
TtlBucket
.startTimeMs
- the start time to usepublic long getTtlIntervalStartTimeMs()
public long getTtlIntervalEndTimeMs()
public static long getTtlIntervalMs()
public Collection<Inode> getInodes()
public void addInode(Inode inode)
inode
- the inode to be addedpublic void removeInode(InodeView inode)
inode
- the inode to be removedpublic int compareTo(TtlBucket ttlBucket)
compareTo
in interface Comparable<TtlBucket>
ttlBucket
- the bucket to be compared togetTtlIntervalStartTimeMs()
from the two buckets are
the same, -1 when that value of current instance is smaller, otherwise, 1public boolean equals(Object o)
Copyright © 2023. All Rights Reserved.