Package com.yahoo.config.provision
Interface Provisioner
-
public interface Provisioner
Interface used by the config system to acquire hosts.- Author:
- Ulf Lilleengen
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
activate(com.yahoo.transaction.NestedTransaction transaction, ApplicationId application, java.util.Collection<HostSpec> hosts)
Activates the allocation of nodes to this application captured in the hosts argument.java.util.List<HostSpec>
prepare(ApplicationId applicationId, ClusterSpec cluster, Capacity capacity, int groups, ProvisionLogger logger)
Prepares allocation of a set of hosts with a given type, common id and the amount.void
remove(com.yahoo.transaction.NestedTransaction transaction, ApplicationId application)
Transactionally remove this application.void
restart(ApplicationId application, HostFilter filter)
Requests a restart of the services of the given application
-
-
-
Method Detail
-
prepare
java.util.List<HostSpec> prepare(ApplicationId applicationId, ClusterSpec cluster, Capacity capacity, int groups, ProvisionLogger logger)
Prepares allocation of a set of hosts with a given type, common id and the amount.- Parameters:
applicationId
- the application requesting hostscluster
- the specification of the cluster to allocate nodes forcapacity
- the capacity requestedgroups
- the number of node groups to divide the requested capacity intologger
- a logger which receives messages which are returned to the requestor- Returns:
- the specification of the hosts allocated
-
activate
void activate(com.yahoo.transaction.NestedTransaction transaction, ApplicationId application, java.util.Collection<HostSpec> hosts)
Activates the allocation of nodes to this application captured in the hosts argument.- Parameters:
transaction
- Transaction with operations to commit together with any operations done within the provisioner.application
- TheApplicationId
that was activated.hosts
- a set ofHostSpec
.
-
remove
void remove(com.yahoo.transaction.NestedTransaction transaction, ApplicationId application)
Transactionally remove this application.- Parameters:
transaction
- Transaction with operations to commit together with any operations done within the provisioner.application
- the application to remove
-
restart
void restart(ApplicationId application, HostFilter filter)
Requests a restart of the services of the given application- Parameters:
application
- the application to restartfilter
- a filter which matches the application nodes to restart
-
-