|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.tomp2p.p2p.Peer
public class Peer
TomP2P implements besides the following distributed hash table (DHT) operations:
| Field Summary | |
|---|---|
static int |
BLOOMFILTER_SIZE
|
| Constructor Summary | |
|---|---|
Peer(int p2pID,
KeyPair keyPair)
|
|
Peer(int p2pID,
Number160 nodeId)
|
|
Peer(int p2pID,
Number160 nodeId,
ConnectionConfigurationBean connectionConfiguration)
|
|
Peer(int p2pID,
Number160 nodeId,
KeyPair keyPair)
|
|
Peer(int p2pID,
Number160 nodeId,
P2PConfiguration peerConfiguration,
ConnectionConfigurationBean connectionConfiguration,
KeyPair keyPair)
|
|
Peer(KeyPair keyPair)
|
|
Peer(Number160 nodeId)
|
|
Peer(Number160 nodeId,
KeyPair keyPair)
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int BLOOMFILTER_SIZE
| Constructor Detail |
|---|
public Peer(KeyPair keyPair)
public Peer(Number160 nodeId)
public Peer(Number160 nodeId,
KeyPair keyPair)
public Peer(int p2pID,
KeyPair keyPair)
public Peer(int p2pID,
Number160 nodeId)
public Peer(int p2pID,
Number160 nodeId,
KeyPair keyPair)
public Peer(int p2pID,
Number160 nodeId,
ConnectionConfigurationBean connectionConfiguration)
public Peer(int p2pID,
Number160 nodeId,
P2PConfiguration peerConfiguration,
ConnectionConfigurationBean connectionConfiguration,
KeyPair keyPair)
| Method Detail |
|---|
public void addPeerListener(PeerListener listener)
public void removePeerListener()
public void shutdown()
InterruptedException
public void listen()
throws Exception
Exception
public void listen(File messageLogger)
throws Exception
Exception
public void listen(int udpPort,
int tcpPort)
throws Exception
Exception
public void listen(int udpPort,
int tcpPort,
File messageLogger)
throws Exception
Exception
public void listen(int udpPort,
int tcpPort,
InetAddress bind)
throws Exception
Exception
public void listen(int udpPort,
int tcpPort,
Bindings bindings)
throws Exception
Exception
public void listen(int udpPort,
int tcpPort,
Bindings bindings,
File messageLogger)
throws Exception
udpPort - the UDP port to listen ontcpPort - the TCP port to listen onbindInformation - contains IP addresses to listen onreplication - statServer -
Exception
public void listen(Peer master)
throws Exception
Exception
protected void init(ConnectionHandler connectionHandler,
Statistics statistics)
public void setDefaultStorageReplication()
public Map<BaseFuture,Long> getPendingFutures()
public boolean isRunning()
public boolean isListening()
public void customLoggerMessage(String customMessage)
public HandshakeRPC getHandshakeRPC()
public StorageRPC getStoreRPC()
public QuitRPC getQuitRPC()
public PeerExchangeRPC getPeerExchangeRPC()
public DirectDataRPC getDirectDataRPC()
public TrackerRPC getTrackerRPC()
public DistributedRouting getRouting()
public ScheduledFuture<?> addIndirectReplicaiton(Runnable runnable)
public ScheduledFuture<?> addMaintainance(Runnable runnable)
public ConnectionHandler getConnectionHandler()
public DistributedHashHashMap getDHT()
public DistributedTracker getTracker()
public PeerBean getPeerBean()
public ConnectionBean getConnectionBean()
public Number160 getPeerID()
public PeerAddress getPeerAddress()
public void setPeerMap(PeerMap peerMap)
public int getP2PID()
public void setRawDataReply(RawDataReply rawDataReply)
public void setObjectDataReply(ObjectDataReply objectDataReply)
public PeerConnection createPeerConnection(PeerAddress destination,
int idleTCPMillis)
destination - The end-point to connect toidleSeconds - time in seconds after a connection gets closed if
idle, -1 if it should remain always open until the user closes the
connection manually.
public FutureData send(PeerAddress remotePeer,
org.jboss.netty.buffer.ChannelBuffer requestBuffer)
public FutureData send(PeerConnection connection,
org.jboss.netty.buffer.ChannelBuffer requestBuffer)
public FutureData send(PeerAddress remotePeer,
Object object)
throws IOException
IOException
public FutureData send(PeerConnection connection,
Object object)
throws IOException
IOExceptionpublic FutureBootstrap bootstrapBroadcast()
public FutureBootstrap bootstrapBroadcast(int port)
public FutureResponse ping(InetSocketAddress address)
public FutureBootstrap bootstrap(InetSocketAddress address)
public FutureBootstrap bootstrap(PeerAddress peerAddress)
public FutureBootstrap bootstrap(PeerAddress peerAddress,
Collection<PeerAddress> bootstrapTo,
ConfigurationStore config)
@Deprecated public void setupPortForwandingUPNP(String internalHost)
public void setupPortForwanding(String internalHost)
internalHost - port - public FutureDiscover discover(PeerAddress peerAddress)
peerAddress -
public FutureDHT put(Number160 locationKey,
Data data)
public FutureDHT put(Number160 locationKey,
Data data,
ConfigurationStore config)
public FutureDHT put(Number160 locationKey,
Map<Number160,Data> dataMap,
ConfigurationStore config)
locationKey - The location in the DHTdataMap - If multiple keys and values are provided, then this method
behaves as putAll()config - The configuration, which be used to configure the
protection mode, putIfAbsent, and repetitions
public FutureDHT add(Number160 locationKey,
Data data)
public FutureDHT add(Number160 locationKey,
Data data,
ConfigurationStore config)
public FutureDHT add(Number160 locationKey,
Collection<Data> dataCollection,
ConfigurationStore config)
public FutureDHT getAll(Number160 locationKey)
public FutureDHT getAll(Number160 locationKey,
ConfigurationGet config)
public FutureDHT get(Number160 locationKey)
public FutureDHT get(Number160 locationKey,
ConfigurationGet config)
public FutureDHT get(Number160 locationKey,
Set<Number160> keyCollection,
ConfigurationGet config)
public FutureDHT digestAll(Number160 locationKey)
public FutureDHT digestAll(Number160 locationKey,
ConfigurationGet config)
public FutureDHT digest(Number160 locationKey)
public FutureDHT digest(Number160 locationKey,
ConfigurationGet config)
public FutureDHT digest(Number160 locationKey,
Set<Number160> keyCollection,
ConfigurationGet config)
public FutureDHT removeAll(Number160 locationKey)
public FutureDHT removeAll(Number160 locationKey,
ConfigurationRemove config)
public FutureDHT remove(Number160 locationKey)
public FutureDHT remove(Number160 locationKey,
ConfigurationRemove config)
public FutureDHT remove(Number160 locationKey,
Number160 contentKey)
public FutureDHT remove(Number160 locationKey,
Set<Number160> keyCollection,
ConfigurationRemove config)
public FutureDHT send(Number160 locationKey,
org.jboss.netty.buffer.ChannelBuffer buffer)
public FutureDHT send(Number160 locationKey,
org.jboss.netty.buffer.ChannelBuffer buffer,
ConfigurationDirect config)
public FutureDHT send(Number160 locationKey,
Object object)
throws IOException
IOException
public FutureDHT send(Number160 locationKey,
Object object,
ConfigurationDirect config)
throws IOException
IOException
public FutureTracker getFromTracker(Number160 locationKey,
ConfigurationTrackerGet config)
public FutureTracker getFromTrackerCreateBloomfilter1(Number160 locationKey,
ConfigurationTrackerGet config,
Collection<PeerAddress> knownPeers)
public FutureTracker getFromTrackerCreateBloomfilter2(Number160 locationKey,
ConfigurationTrackerGet config,
Collection<Number160> knownPeers)
public FutureTracker getFromTracker(Number160 locationKey,
ConfigurationTrackerGet config,
Set<Number160> knownPeers)
public FutureTracker addToTracker(Number160 locationKey,
ConfigurationTrackerStore config)
public ConnectionConfigurationBean getConnectionConfiguration()
public P2PConfiguration getP2PConfiguration()
public static RequestP2PConfiguration adjustConfiguration(RequestP2PConfiguration p2pConfiguration,
PeerMap peerMap)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||