public class DHTConfig extends Object
Constructor and Description |
---|
DHTConfig() |
Modifier and Type | Method and Description |
---|---|
Collection<InetPeerAddress> |
getBootstrapNodes() |
int |
getListeningPort() |
void |
setBootstrapNodes(Collection<InetPeerAddress> bootstrapNodes) |
void |
setListeningPort(int listeningPort) |
void |
setShouldUseIPv6(boolean useIPv6) |
void |
setShouldUseRouterBootstrap(boolean useRouterBootstrap) |
boolean |
shouldUseIPv6() |
boolean |
shouldUseRouterBootstrap() |
public int getListeningPort()
setListeningPort(int)
public void setListeningPort(int listeningPort)
listeningPort
- Local port the DHT service will be listening onpublic boolean shouldUseRouterBootstrap()
setShouldUseRouterBootstrap(boolean)
public void setShouldUseRouterBootstrap(boolean useRouterBootstrap)
useRouterBootstrap
- Indicates whether public bootstrap services will be usedpublic boolean shouldUseIPv6()
shouldUseIPv6()
public void setShouldUseIPv6(boolean useIPv6)
useIPv6
- Indicates whether IPv6 interface should be preferred for attaching the local DHT node.
Should not be set to true, if no IPv6 interfaces are available on current system.public Collection<InetPeerAddress> getBootstrapNodes()
setBootstrapNodes(Collection)
public void setBootstrapNodes(Collection<InetPeerAddress> bootstrapNodes)
bootstrapNodes
- DHT nodes to use upon startup to connect to the swarm.Copyright © 2016–2021. All rights reserved.