com.netflix.eureka2.server.service.ReplicationChannel Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of eureka-server Show documentation
Show all versions of eureka-server Show documentation
eureka-server developed by Netflix
package com.netflix.eureka2.server.service;
import com.netflix.eureka2.registry.InstanceInfo;
import com.netflix.eureka2.server.registry.Source;
import com.netflix.eureka2.service.ServiceChannel;
import rx.Observable;
/**
* A {@link com.netflix.eureka2.service.ServiceChannel} implementation representing a replication stream
* between two Eureka write servers.
*
* The client side of the channel is a source of data, that comes from its own registry, and is limited
* to entries with {@link Source.Origin#LOCAL}.
*
* On the server side the data are put into the registry with origin set to {@link Source.Origin#REPLICATED}.
* A replicated entry is removed from the registry under following circumstances:
*
* - Explicit {@link #unregister(String)} call - an entry was removed from the source registry
* - Replication connection termination - invalidates all entries replicated over this connection
* - No heartbeat within configured period of time - equivalent to connection termination
*
*
* @author Nitesh Kant
*/
public interface ReplicationChannel extends ServiceChannel {
/**
* Registers the passed instance with eureka.
*
* @param instanceInfo The instance definition.
*
* @return Acknowledgment for the registration.
*/
Observable register(InstanceInfo instanceInfo);
/**
* Updates the {@link InstanceInfo} registered with this channel.
*
* @param newInfo The updated info.
*
* @return Acknowledgment for this update.
*/
Observable update(InstanceInfo newInfo);
/**
* Unregisters the {@link InstanceInfo} with given id.
*
* @return Acknowledgment for unregistration.
*/
Observable unregister(String instanceId);
}