パッケージ org.piax.common
クラス DdllKey
java.lang.Object
org.piax.common.DdllKey
- すべての実装されたインタフェース:
Serializable,Cloneable,Comparable<DdllKey>
public class DdllKey extends Object implements Comparable<DdllKey>, Serializable, Cloneable
A class representing a key for DDLL.
An instance of DdllKey contains a primaryKey, peerId and id. A PeerId is used for making the DdllKey unique.
IDs are used for identifying linked-lists. Different linked-lists should have different IDs. When repairing a linked-list, keys that have the same ID is used as a hint for finding a live left node.
appData is an application-specific data. For example, the skip graph implementation (org.piax.gtrans.ov.sg) uses this field for passing a membership vector.
- 関連項目:
- 直列化された形式
-
フィールドの概要
-
コンストラクタの概要
コンストラクタ コンストラクタ 説明 DdllKey(Comparable<?> key, PeerId peerId)DdllKey(Comparable<?> key, PeerId peerId, int nonce)DdllKey(Comparable<?> key, PeerId peerId, String id, int nonce, Object appData)DdllKey(Comparable<?> key, PeerId peerId, String id, Object appData) -
メソッドの概要
修飾子とタイプ メソッド 説明 Objectclone()intcompareTo(DdllKey o)booleanequals(Object obj)booleanequals2(DdllKey o)compare without idStringgetId()DdllKeygetIdChangedKey(String id)get a DdllKey instance with the specified IDPeerIdgetPeerId()get PeerID portion of the keyComparable<?>getRawKey()get rawKey portion of the keyinthashCode()inthashCode2()hashcode without idStringtoString()
-
フィールド詳細
-
コンストラクタの詳細
-
メソッドの詳細
-
getRawKey
get rawKey portion of the key- 戻り値:
- the raw key
-
getPeerId
get PeerID portion of the key- 戻り値:
- the PeerID
-
getId
-
compareTo
- 定義:
compareToインタフェース内Comparable<DdllKey>
-
equals
-
equals2
compare without id- パラメータ:
o- the key object.- 戻り値:
- comparison results
-
hashCode
public int hashCode() -
hashCode2
public int hashCode2()hashcode without id- 戻り値:
- hashcode
-
toString
-
clone
-
getIdChangedKey
get a DdllKey instance with the specified ID- パラメータ:
id- an id to be set- 戻り値:
- the DdllKey with the specified ID
-