/** Returns whether this container should receive traffic at this time */ public boolean isInRotation() { if (inRotationOverride != null) return inRotationOverride; return clustersStatus.containerShouldReceiveTraffic(); }
/** Note that a cluster (which influences up/down state) is down */ public void removeFromRotation(String clusterIdentifier) { clustersStatus.setDown(clusterIdentifier); }
/** Note that a cluster (which influences up/down state) is up */ public void addToRotation(String clusterIdentifier) { clustersStatus.setUp(clusterIdentifier); }
@Inject public VipStatus(QrSearchersConfig dispatchers, VipStatusConfig vipStatusConfig, ClustersStatus clustersStatus) { this.clustersStatus = clustersStatus; clustersStatus.setReceiveTrafficByDefault(vipStatusConfig.initiallyInRotation()); clustersStatus.setContainerHasClusters(! dispatchers.searchcluster().isEmpty()); }
public VipStatus(QrSearchersConfig dispatchers) { this(dispatchers, new VipStatusConfig(new VipStatusConfig.Builder()), new ClustersStatus()); }
public VipStatus() { this(new QrSearchersConfig(new QrSearchersConfig.Builder()), new VipStatusConfig(new VipStatusConfig.Builder()), new ClustersStatus()); }
/** @deprecated use setDown(String) instead */ @Deprecated // TODO: Remove on Vespa 8 public void setDown(Object clusterIdentifier) { setDown((String) clusterIdentifier); }
/** @deprecated use setUp(String) instead */ @Deprecated // TODO: Remove on Vespa 8 public void setUp(Object clusterIdentifier) { setUp((String) clusterIdentifier); }