コンストラクタ | 説明 |
---|---|
Piece(int id) |
修飾子とタイプ | メソッド | 説明 |
---|---|---|
boolean |
addPeer(Peer peer) |
caller must synchronize
|
void |
clear() |
Clear all knowledge of peers
Caller must synchronize
|
int |
compareTo(Piece op) |
Highest priority first,
then rarest first
|
boolean |
equals(java.lang.Object o) |
|
int |
getId() |
|
int |
getPeerCount() |
How many peers have this piece?
Caller must synchronize
|
int |
getPriority() |
|
int |
getRequestCount() |
How many peers are requesting this piece?
Caller must synchronize
|
int |
hashCode() |
|
boolean |
isDisabled() |
|
boolean |
isRequested() |
caller must synchronize
|
boolean |
isRequestedBy(Peer peer) |
Is peer requesting this piece?
Caller must synchronize
|
boolean |
removePeer(Peer peer) |
Caller must synchronize.
|
void |
setDisabled() |
|
void |
setPriority(int p) |
|
void |
setRequested(Peer peer,
boolean requested) |
Since 0.8.3, keep track of who is requesting here,
to avoid deadlocks from querying each peer.
|
java.lang.String |
toString() |
public int compareTo(Piece op)
compareTo
インタフェース内 java.lang.Comparable<Piece>
public boolean equals(java.lang.Object o)
equals
クラス内 java.lang.Object
public int hashCode()
hashCode
クラス内 java.lang.Object
public int getId()
public boolean addPeer(Peer peer)
public boolean removePeer(Peer peer)
public int getPeerCount()
public boolean isRequested()
public void setRequested(Peer peer, boolean requested)
public boolean isRequestedBy(Peer peer)
public int getRequestCount()
public void clear()
public int getPriority()
public void setPriority(int p)
public boolean isDisabled()
public void setDisabled()
public java.lang.String toString()
toString
クラス内 java.lang.Object