Package convex.cli.peer
Class PeerManager
java.lang.Object
convex.cli.peer.PeerManager
Convex CLI PeerManager
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionprotected void
Add all peers started in this session to the session list.protected void
addToSession
(Server peerServer) Add a peer to the session list of peers.aquireBelief
(String remotePeerHostname, Hash beliefHash) aquireState
(String remotePeerHostname, Hash stateHash) static PeerManager
static PeerManager
getNetworkHashList
(String remotePeerHostname) protected int
getServerIndex
(AccountKey peerKey) void
launchLocalPeers
(List<AKeyPair> keyPairList, int[] peerPorts) void
launchPeer
(int port, String remotePeerHostname, String url, String bindAddress) void
launchRestAPI
(int port) protected void
Load in a session from a session file.protected void
Remove all peers added by this manager from the session list of peers.void
Once the manager has launched 1 or more peers.protected void
Store the session details to file.
-
Field Details
-
TRANSACTION_TIMEOUT_MILLIS
protected static final long TRANSACTION_TIMEOUT_MILLIS- See Also:
-
FRIENDLY_HEX_STRING_SIZE
protected static final int FRIENDLY_HEX_STRING_SIZE- See Also:
-
peerServerList
-
session
-
sessionFilename
-
keyPair
-
address
-
store
-
-
Method Details
-
create
-
create
public static PeerManager create(String sessionFilename, AKeyPair keyPair, Address address, AStore store) -
launchLocalPeers
-
getNetworkHashList
-
aquireState
-
aquireBelief
-
launchPeer
-
loadSession
protected void loadSession()Load in a session from a session file.- Parameters:
sessionFilename
- Filename to load.
-
addToSession
Add a peer to the session list of peers.- Parameters:
peerServer
- Add the peerServer to the list of peers for this session.
-
addAllToSession
protected void addAllToSession()Add all peers started in this session to the session list. -
removeAllFromSession
protected void removeAllFromSession()Remove all peers added by this manager from the session list of peers. -
storeSession
protected void storeSession()Store the session details to file.- Parameters:
sessionFilename
- Fileneame to save the session.
-
showPeerEvents
public void showPeerEvents()Once the manager has launched 1 or more peers. The manager now needs too loop and show any events generated by the peers -
getServerIndex
-
launchRestAPI
public void launchRestAPI(int port)
-