Package com.yahoo.container.handler
Class ClustersStatus
- java.lang.Object
-
- com.yahoo.component.AbstractComponent
-
- com.yahoo.container.handler.ClustersStatus
-
- All Implemented Interfaces:
com.yahoo.component.Component
,com.yahoo.component.Deconstructable
,Comparable<com.yahoo.component.Component>
public class ClustersStatus extends com.yahoo.component.AbstractComponent
A component which tracks the up/down status of any clusters which should influence the up down status of this container itself, as well as the separate fact (from config) that such clusters are present. This is a separate fact because we might know we have clusters configured but we don't have positive information that they are up yet, and in this case we should be down. This is a separate component which has no dependencies such that the status tracked in this will survive reconfiguration events and inform other components even immediately after a reconfiguration (where the true statue of clusters may not yet be available). This is multithread safe.- Author:
- bratseth
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ClustersStatus.Require
-
Constructor Summary
Constructors Constructor Description ClustersStatus()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description boolean
containerShouldReceiveTraffic()
Deprecated.boolean
containerShouldReceiveTraffic(ClustersStatus.Require require)
Returns whether this container should receive traffic based on the state of thisvoid
setClusters(Set<String> clusters)
Sets the current clusters of this containervoid
setDown(Object clusterIdentifier)
Deprecated.use setDown(String) insteadvoid
setReceiveTrafficByDefault(boolean receiveTrafficByDefault)
Deprecated.this is ignoredvoid
setUp(Object clusterIdentifier)
Deprecated.use setUp(String) instead
-
-
-
Method Detail
-
setClusters
public void setClusters(Set<String> clusters)
Sets the current clusters of this container
-
setReceiveTrafficByDefault
@Deprecated public void setReceiveTrafficByDefault(boolean receiveTrafficByDefault)
Deprecated.this is ignored
-
setUp
@Deprecated public void setUp(Object clusterIdentifier)
Deprecated.use setUp(String) instead
-
setDown
@Deprecated public void setDown(Object clusterIdentifier)
Deprecated.use setDown(String) instead
-
containerShouldReceiveTraffic
@Deprecated public boolean containerShouldReceiveTraffic()
Deprecated.
-
containerShouldReceiveTraffic
public boolean containerShouldReceiveTraffic(ClustersStatus.Require require)
Returns whether this container should receive traffic based on the state of this- Parameters:
require
- requirement for being up, ALL or ONE.
-
-