com.netflix.eureka2.service.InterestChannel Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of eureka-core Show documentation
Show all versions of eureka-core Show documentation
eureka-core developed by Netflix
package com.netflix.eureka2.service;
import com.netflix.eureka2.interests.Interest;
import com.netflix.eureka2.registry.InstanceInfo;
import rx.Observable;
/**
* A {@link ServiceChannel} implementation for interest set notifications.
* The channel interest can be upgraded any number of times as long as the channel is open.
*
* The following are the states of an {@link InterestChannel}
*
*
- Idle: Channel is created but no streams are flowing
- Open: Channel is open and interest stream is flowing (can be empty stream due to empty interest)
- Close: Channel closed. Nothing can be done on this channel anymore.
*
* @author Nitesh Kant
*/
public interface InterestChannel extends ServiceChannel {
/**
* An operation to change the interest set for this channel to a new interest set.
* When this change is acknowledged, the older interest set is removed and the passed
* {@code newInterest} becomes the only interest for this channel. So, any change
* interest set should include the earlier interest if required.
*
* The returned {@link Observable} acts as the acknowledgment for this change.
*
* @param newInterest The new interest for this channel.
*
* @return An acknowledgment for this change.
*/
Observable change(Interest newInterest);
}