@ThreadSafe public final class TtlBucket extends java.lang.Object implements java.lang.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(java.lang.Object o)
Compares to a specific object.
|
java.util.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 java.util.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 java.lang.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(java.lang.Object o)
equals in class java.lang.Objecto - the object to compareTtlBucket and represents the same TtlIntervalStartTimeCopyright © 2019. All Rights Reserved.