Package uk.co.ractf.polaris.state
Interface ClusterState
-
- All Known Implementing Classes:
ConsulState
public interface ClusterState
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voiddeleteAPIToken(java.lang.String id)voiddeleteCredential(uk.co.ractf.polaris.api.namespace.NamespacedId id)voiddeleteInstance(uk.co.ractf.polaris.api.instance.Instance instance)Unregisters anInstancefrom a givenTask, probably because its been descheduledvoiddeleteNamespace(java.lang.String id)voiddeleteNotificationReceiver(uk.co.ractf.polaris.api.namespace.NamespacedId id)voiddeleteTask(uk.co.ractf.polaris.api.namespace.NamespacedId id)uk.co.ractf.polaris.api.authentication.APITokengetAPIToken(java.lang.String id)java.util.Map<java.lang.String,uk.co.ractf.polaris.api.authentication.APIToken>getAPITokens()uk.co.ractf.polaris.api.registry.credentials.ContainerRegistryCredentialsgetCredential(uk.co.ractf.polaris.api.namespace.NamespacedId id)java.util.Map<uk.co.ractf.polaris.api.namespace.NamespacedId,uk.co.ractf.polaris.api.registry.credentials.ContainerRegistryCredentials>getCredentials()java.util.Map<uk.co.ractf.polaris.api.namespace.NamespacedId,uk.co.ractf.polaris.api.registry.credentials.ContainerRegistryCredentials>getCredentials(java.lang.String namespace)@Nullable uk.co.ractf.polaris.api.instance.InstancegetInstance(java.lang.String id)Gets anInstanceby idjava.util.Map<uk.co.ractf.polaris.api.namespace.NamespacedId,java.lang.Integer>getInstanceCounts()java.util.List<java.lang.String>getInstanceIds()java.util.Map<java.lang.String,uk.co.ractf.polaris.api.instance.Instance>getInstances()java.util.Map<java.lang.String,uk.co.ractf.polaris.api.instance.Instance>getInstancesOfTask(uk.co.ractf.polaris.api.namespace.NamespacedId namespacedId)@NotNull java.util.Map<java.lang.String,uk.co.ractf.polaris.api.instance.Instance>getInstancesOnNode(java.lang.String node)Gets a list ofInstances on a given node.uk.co.ractf.polaris.api.namespace.NamespacegetNamespace(java.lang.String id)java.util.Map<java.lang.String,uk.co.ractf.polaris.api.namespace.Namespace>getNamespaces()@Nullable uk.co.ractf.polaris.api.node.NodeInfogetNode(java.lang.String id)Gets aNodeInfoby id@NotNull java.util.Map<java.lang.String,uk.co.ractf.polaris.api.node.NodeInfo>getNodes()Gets aMapof host id toNodeuk.co.ractf.polaris.api.notification.NotificationReceivergetNotificationReceiver(uk.co.ractf.polaris.api.namespace.NamespacedId id)java.util.Map<uk.co.ractf.polaris.api.namespace.NamespacedId,uk.co.ractf.polaris.api.notification.NotificationReceiver>getNotificationReceivers()java.util.Map<uk.co.ractf.polaris.api.namespace.NamespacedId,uk.co.ractf.polaris.api.notification.NotificationReceiver>getNotificationReceivers(java.lang.String namespace)uk.co.ractf.polaris.api.task.TaskgetTask(uk.co.ractf.polaris.api.namespace.NamespacedId id)java.util.List<uk.co.ractf.polaris.api.namespace.NamespacedId>getTaskIds()java.util.Map<uk.co.ractf.polaris.api.namespace.NamespacedId,uk.co.ractf.polaris.api.task.Task>getTasks()java.util.Map<uk.co.ractf.polaris.api.namespace.NamespacedId,uk.co.ractf.polaris.api.task.Task>getTasks(java.lang.String namespace)booleaninstanceExists(java.lang.String id)booleanlockTask(uk.co.ractf.polaris.api.task.Task task)voidsetAPIToken(uk.co.ractf.polaris.api.authentication.APIToken apiToken)voidsetCredential(uk.co.ractf.polaris.api.registry.credentials.ContainerRegistryCredentials credential)voidsetInstance(uk.co.ractf.polaris.api.instance.Instance instance)Sets the state of an instancevoidsetNamespace(uk.co.ractf.polaris.api.namespace.Namespace namespace)voidsetNodeInfo(uk.co.ractf.polaris.api.node.NodeInfo nodeInfo)Sets the info for a nodevoidsetNotificationReceiver(uk.co.ractf.polaris.api.notification.NotificationReceiver receiver)voidsetTask(uk.co.ractf.polaris.api.task.Task task)booleanunlockTask(uk.co.ractf.polaris.api.task.Task task)
-
-
-
Method Detail
-
getNodes
@NotNull @NotNull java.util.Map<java.lang.String,uk.co.ractf.polaris.api.node.NodeInfo> getNodes()
Gets aMapof host id toNode- Returns:
- map of hosts
-
getNode
@Nullable @Nullable uk.co.ractf.polaris.api.node.NodeInfo getNode(java.lang.String id)
Gets aNodeInfoby id- Parameters:
id- host id- Returns:
- the host
-
setNodeInfo
void setNodeInfo(uk.co.ractf.polaris.api.node.NodeInfo nodeInfo)
Sets the info for a node- Parameters:
nodeInfo- node info
-
getInstance
@Nullable @Nullable uk.co.ractf.polaris.api.instance.Instance getInstance(java.lang.String id)
Gets anInstanceby id- Parameters:
id- the instance id- Returns:
- the instance
-
deleteInstance
void deleteInstance(uk.co.ractf.polaris.api.instance.Instance instance)
Unregisters anInstancefrom a givenTask, probably because its been descheduled- Parameters:
instance- the instance
-
setInstance
void setInstance(uk.co.ractf.polaris.api.instance.Instance instance)
Sets the state of an instance- Parameters:
instance- the instance details
-
instanceExists
boolean instanceExists(java.lang.String id)
-
getInstancesOnNode
@NotNull @NotNull java.util.Map<java.lang.String,uk.co.ractf.polaris.api.instance.Instance> getInstancesOnNode(java.lang.String node)
Gets a list ofInstances on a given node. Returns an empty collection if the node id is invalid.- Parameters:
node- node id- Returns:
- instances on the node
-
getInstancesOfTask
java.util.Map<java.lang.String,uk.co.ractf.polaris.api.instance.Instance> getInstancesOfTask(uk.co.ractf.polaris.api.namespace.NamespacedId namespacedId)
-
getInstanceIds
java.util.List<java.lang.String> getInstanceIds()
-
getInstances
java.util.Map<java.lang.String,uk.co.ractf.polaris.api.instance.Instance> getInstances()
-
getInstanceCounts
java.util.Map<uk.co.ractf.polaris.api.namespace.NamespacedId,java.lang.Integer> getInstanceCounts()
-
getTasks
java.util.Map<uk.co.ractf.polaris.api.namespace.NamespacedId,uk.co.ractf.polaris.api.task.Task> getTasks()
-
getTaskIds
java.util.List<uk.co.ractf.polaris.api.namespace.NamespacedId> getTaskIds()
-
getTasks
java.util.Map<uk.co.ractf.polaris.api.namespace.NamespacedId,uk.co.ractf.polaris.api.task.Task> getTasks(java.lang.String namespace)
-
getTask
uk.co.ractf.polaris.api.task.Task getTask(uk.co.ractf.polaris.api.namespace.NamespacedId id)
-
setTask
void setTask(uk.co.ractf.polaris.api.task.Task task)
-
deleteTask
void deleteTask(uk.co.ractf.polaris.api.namespace.NamespacedId id)
-
lockTask
boolean lockTask(uk.co.ractf.polaris.api.task.Task task)
-
unlockTask
@CanIgnoreReturnValue boolean unlockTask(uk.co.ractf.polaris.api.task.Task task)
-
getNamespaces
java.util.Map<java.lang.String,uk.co.ractf.polaris.api.namespace.Namespace> getNamespaces()
-
getNamespace
uk.co.ractf.polaris.api.namespace.Namespace getNamespace(java.lang.String id)
-
setNamespace
void setNamespace(uk.co.ractf.polaris.api.namespace.Namespace namespace)
-
deleteNamespace
void deleteNamespace(java.lang.String id)
-
getCredentials
java.util.Map<uk.co.ractf.polaris.api.namespace.NamespacedId,uk.co.ractf.polaris.api.registry.credentials.ContainerRegistryCredentials> getCredentials()
-
getCredentials
java.util.Map<uk.co.ractf.polaris.api.namespace.NamespacedId,uk.co.ractf.polaris.api.registry.credentials.ContainerRegistryCredentials> getCredentials(java.lang.String namespace)
-
getCredential
uk.co.ractf.polaris.api.registry.credentials.ContainerRegistryCredentials getCredential(uk.co.ractf.polaris.api.namespace.NamespacedId id)
-
setCredential
void setCredential(uk.co.ractf.polaris.api.registry.credentials.ContainerRegistryCredentials credential)
-
deleteCredential
void deleteCredential(uk.co.ractf.polaris.api.namespace.NamespacedId id)
-
getAPITokens
java.util.Map<java.lang.String,uk.co.ractf.polaris.api.authentication.APIToken> getAPITokens()
-
getAPIToken
uk.co.ractf.polaris.api.authentication.APIToken getAPIToken(java.lang.String id)
-
setAPIToken
void setAPIToken(uk.co.ractf.polaris.api.authentication.APIToken apiToken)
-
deleteAPIToken
void deleteAPIToken(java.lang.String id)
-
setNotificationReceiver
void setNotificationReceiver(uk.co.ractf.polaris.api.notification.NotificationReceiver receiver)
-
deleteNotificationReceiver
void deleteNotificationReceiver(uk.co.ractf.polaris.api.namespace.NamespacedId id)
-
getNotificationReceivers
java.util.Map<uk.co.ractf.polaris.api.namespace.NamespacedId,uk.co.ractf.polaris.api.notification.NotificationReceiver> getNotificationReceivers()
-
getNotificationReceivers
java.util.Map<uk.co.ractf.polaris.api.namespace.NamespacedId,uk.co.ractf.polaris.api.notification.NotificationReceiver> getNotificationReceivers(java.lang.String namespace)
-
getNotificationReceiver
uk.co.ractf.polaris.api.notification.NotificationReceiver getNotificationReceiver(uk.co.ractf.polaris.api.namespace.NamespacedId id)
-
-