@Singleton
public class PeerEurekaNodes
extends java.lang.Object
PeerEurekaNodes.| Constructor and Description |
|---|
PeerEurekaNodes(PeerAwareInstanceRegistry registry,
EurekaServerConfig serverConfig,
com.netflix.discovery.EurekaClientConfig clientConfig,
ServerCodecs serverCodecs,
com.netflix.appinfo.ApplicationInfoManager applicationInfoManager) |
| Modifier and Type | Method and Description |
|---|---|
protected PeerEurekaNode |
createPeerEurekaNode(java.lang.String peerEurekaNodeUrl) |
java.util.List<PeerEurekaNode> |
getPeerEurekaNodes() |
java.util.List<PeerEurekaNode> |
getPeerNodesView() |
static java.lang.String |
hostFromUrl(java.lang.String url) |
static boolean |
isThisMe(java.lang.String url)
Deprecated.
2016-06-27 use instance version of
isThisMyUrl(String)
Checks if the given service url contains the current host which is trying
to replicate. Only after the EIP binding is done the host has a chance to
identify itself in the list of replica nodes and needs to take itself out
of replication traffic. |
boolean |
isThisMyUrl(java.lang.String url)
Checks if the given service url contains the current host which is trying
to replicate.
|
protected java.util.List<java.lang.String> |
resolvePeerUrls()
Resolve peer URLs.
|
void |
shutdown() |
void |
start() |
protected void |
updatePeerEurekaNodes(java.util.List<java.lang.String> newPeerUrls)
Given new set of replica URLs, destroy
PeerEurekaNodes no longer available, and
create new ones. |
@Inject public PeerEurekaNodes(PeerAwareInstanceRegistry registry, EurekaServerConfig serverConfig, com.netflix.discovery.EurekaClientConfig clientConfig, ServerCodecs serverCodecs, com.netflix.appinfo.ApplicationInfoManager applicationInfoManager)
public java.util.List<PeerEurekaNode> getPeerNodesView()
public java.util.List<PeerEurekaNode> getPeerEurekaNodes()
public void start()
public void shutdown()
protected java.util.List<java.lang.String> resolvePeerUrls()
protected void updatePeerEurekaNodes(java.util.List<java.lang.String> newPeerUrls)
PeerEurekaNodes no longer available, and
create new ones.newPeerUrls - peer node URLs; this collection should have local node's URL filtered outprotected PeerEurekaNode createPeerEurekaNode(java.lang.String peerEurekaNodeUrl)
public static boolean isThisMe(java.lang.String url)
isThisMyUrl(String)
Checks if the given service url contains the current host which is trying
to replicate. Only after the EIP binding is done the host has a chance to
identify itself in the list of replica nodes and needs to take itself out
of replication traffic.url - the service url of the replica node that the check is made.public boolean isThisMyUrl(java.lang.String url)
url - the service url of the replica node that the check is made.public static java.lang.String hostFromUrl(java.lang.String url)