Package alluxio.wire
Class TieredIdentity
- java.lang.Object
-
- alluxio.wire.TieredIdentity
-
- All Implemented Interfaces:
java.io.Serializable
@PublicApi public final class TieredIdentity extends java.lang.Object implements java.io.Serializable
Class representing a node's tier identity. A tier identity is a list of locality tiers identifying network topology, e.g. (host: hostname, rack: rack1).- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
TieredIdentity.LocalityTier
Class representing a locality tier, e.g.
-
Constructor Summary
Constructors Constructor Description TieredIdentity(java.util.List<TieredIdentity.LocalityTier> tiers)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
TieredIdentity.LocalityTier
getTier(int i)
java.util.List<TieredIdentity.LocalityTier>
getTiers()
int
hashCode()
boolean
topTiersMatch(TieredIdentity other)
java.lang.String
toString()
-
-
-
Constructor Detail
-
TieredIdentity
public TieredIdentity(java.util.List<TieredIdentity.LocalityTier> tiers)
- Parameters:
tiers
- the tiers of the tier identity
-
-
Method Detail
-
getTiers
public java.util.List<TieredIdentity.LocalityTier> getTiers()
- Returns:
- the tiers of the tier identity
-
getTier
public TieredIdentity.LocalityTier getTier(int i)
- Parameters:
i
- a tier index- Returns:
- the ith locality tier
-
topTiersMatch
public boolean topTiersMatch(TieredIdentity other)
- Parameters:
other
- a tiered identity to compare to- Returns:
- whether the top tier of this tiered identity matches the top tier of other
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-