Class ShortCircuitShm.ShmId
java.lang.Object
org.apache.hadoop.hdfs.shortcircuit.ShortCircuitShm.ShmId
- All Implemented Interfaces:
Comparable<ShortCircuitShm.ShmId>
- Enclosing class:
- ShortCircuitShm
public static class ShortCircuitShm.ShmId
extends Object
implements Comparable<ShortCircuitShm.ShmId>
Identifies a DfsClientShm.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintcompareTo(ShortCircuitShm.ShmId other) static ShortCircuitShm.ShmIdGenerate a random ShmId.booleanlonggetHi()longgetLo()inthashCode()toString()
-
Constructor Details
-
ShmId
public ShmId(long hi, long lo)
-
-
Method Details
-
createRandom
Generate a random ShmId. We generate ShmIds randomly to prevent a malicious client from successfully guessing one and using that to interfere with another client. -
getHi
public long getHi() -
getLo
public long getLo() -
equals
-
hashCode
public int hashCode() -
toString
-
compareTo
- Specified by:
compareToin interfaceComparable<ShortCircuitShm.ShmId>
-