public class PeerEurekaNode
extends java.lang.Object
PeerEurekaNode represents a peer node to which information
should be shared from this node.
This class handles replicating all update operations like Register,Renew,Cancel,Expiration and Status Changes to the eureka node it represents.
| Modifier and Type | Class and Description |
|---|---|
static class |
PeerEurekaNode.ReplicationInstance |
static class |
PeerEurekaNode.ReplicationInstanceResponse |
static class |
PeerEurekaNode.ReplicationList |
static class |
PeerEurekaNode.ReplicationListResponse |
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
HEADER_REPLICATION |
| Constructor and Description |
|---|
PeerEurekaNode(java.lang.String serviceUrl) |
| Modifier and Type | Method and Description |
|---|---|
void |
cancel(java.lang.String appName,
java.lang.String id)
Send the cancellation information of an instance to the node represented
by this class.
|
void |
deleteStatusOverride(java.lang.String appName,
java.lang.String id,
com.netflix.appinfo.InstanceInfo info)
Delete instance status override.
|
void |
destroyResources()
Destroy the resources created for communication with the Peer Eureka
Server.
|
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getServiceUrl()
Get the service Url of the peer eureka node.
|
int |
hashCode() |
void |
heartbeat(java.lang.String appName,
java.lang.String id,
com.netflix.appinfo.InstanceInfo info,
com.netflix.appinfo.InstanceInfo.InstanceStatus overriddenStatus,
boolean primeConnection)
Send the heartbeat information of an instance to the node represented by
this class.
|
void |
register(com.netflix.appinfo.InstanceInfo info)
Sends the registration information of
InstanceInfo receiving by
this node to the peer node represented by this class. |
void |
shutDown()
Shuts down all resources used for peer replication.
|
void |
statusUpdate(java.lang.String asgName,
ASGResource.ASGStatus newStatus)
Send the status information of of the ASG represented by the instance.
|
void |
statusUpdate(java.lang.String appName,
java.lang.String id,
com.netflix.appinfo.InstanceInfo.InstanceStatus newStatus,
com.netflix.appinfo.InstanceInfo info)
Send the status update of the instance.
|
public static final java.lang.String HEADER_REPLICATION
public void register(com.netflix.appinfo.InstanceInfo info)
throws java.lang.Exception
InstanceInfo receiving by
this node to the peer node represented by this class.info - the instance information InstanceInfo of any instance
that is send to this instance.java.lang.Exceptionpublic void cancel(java.lang.String appName,
java.lang.String id)
throws java.lang.Exception
appName - the application name of the instance.id - the unique identifier of the instance.java.lang.Exceptionpublic void heartbeat(java.lang.String appName,
java.lang.String id,
com.netflix.appinfo.InstanceInfo info,
com.netflix.appinfo.InstanceInfo.InstanceStatus overriddenStatus,
boolean primeConnection)
throws java.lang.Throwable
appName - the application name of the instance.id - the unique identifier of the instance.info - the instance info InstanceInfo of the instance.overriddenStatus - the overridden status information if any of the instance.java.lang.Throwablepublic void statusUpdate(java.lang.String asgName,
ASGResource.ASGStatus newStatus)
ASG (Autoscaling group) names are available for instances in AWS and the
ASG information is used for determining if the instance should be
registered as InstanceInfo.InstanceStatus.DOWN or InstanceInfo.InstanceStatus.UP.
asgName - the asg name if any of this instance.newStatus - the new status of the ASG.public void statusUpdate(java.lang.String appName,
java.lang.String id,
com.netflix.appinfo.InstanceInfo.InstanceStatus newStatus,
com.netflix.appinfo.InstanceInfo info)
appName - the application name of the instance.id - the unique identifier of the instance.newStatus - the new status of the instance.info - the instance information of the instance.public void deleteStatusOverride(java.lang.String appName,
java.lang.String id,
com.netflix.appinfo.InstanceInfo info)
appName - the application name of the instance.id - the unique identifier of the instance.info - the instance information of the instance.public java.lang.String getServiceUrl()
public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic void destroyResources()
public void shutDown()