@Path(value="/") @Consumes(value="application/json") @Produces(value="application/json") public class CloudPoolHandler extends Object
| Constructor and Description |
|---|
CloudPoolHandler(CloudPool cloudPool) |
| Modifier and Type | Method and Description |
|---|---|
javax.ws.rs.core.Response |
attachMachine(String machineId)
Attaches an already running machine instance to the pool, growing the
pool with a new member.
|
javax.ws.rs.core.Response |
detachMachine(String machineId,
DetachMachineRequest request)
Removes a member from the pool without terminating it.
|
javax.ws.rs.core.Response |
getPool()
Retrieves the current machine pool members.
|
javax.ws.rs.core.Response |
getPoolSize()
Returns the current size of the machine pool -- both in terms of the
desired size and the actual size (as these may differ at any time).
|
javax.ws.rs.core.Response |
setDesiredSize(SetDesiredSizeRequest request)
Sets the desired number of machines in the machine pool.
|
javax.ws.rs.core.Response |
setMembershipStatus(String machineId,
SetMembershipStatusRequest request) |
javax.ws.rs.core.Response |
setServiceState(String machineId,
SetServiceStateRequest request)
Sets the service state of a given machine pool member.
|
javax.ws.rs.core.Response |
terminateMachine(String machineId,
TerminateMachineRequest request)
Terminates a particular machine pool member.
|
public CloudPoolHandler(CloudPool cloudPool)
@GET @Path(value="/pool") public javax.ws.rs.core.Response getPool()
@POST @Path(value="/pool/size") public javax.ws.rs.core.Response setDesiredSize(SetDesiredSizeRequest request)
request - The desired number of machine in the pool.@GET @Path(value="/pool/size") public javax.ws.rs.core.Response getPoolSize()
@POST
@Path(value="/pool/{machine}/terminate")
public javax.ws.rs.core.Response terminateMachine(@PathParam(value="machine")
String machineId,
TerminateMachineRequest request)
machineId - The identifier of the machine to terminate.request - A TerminateMachineRequest.@POST
@Path(value="/pool/{machine}/detach")
public javax.ws.rs.core.Response detachMachine(@PathParam(value="machine")
String machineId,
DetachMachineRequest request)
machineId - The identifier of the machine to detach from the pool.request - A DetachMachineRequest.@POST
@Path(value="/pool/{machine}/attach")
public javax.ws.rs.core.Response attachMachine(@PathParam(value="machine")
String machineId)
machineId - The identifier of the machine to attach to the pool.@POST
@Path(value="/pool/{machine}/serviceState")
public javax.ws.rs.core.Response setServiceState(@PathParam(value="machine")
String machineId,
SetServiceStateRequest request)
machineId - The machine whose service state is to be set.request - A SetServiceStateRequest.@POST
@Path(value="/pool/{machine}/membershipStatus")
public javax.ws.rs.core.Response setMembershipStatus(@PathParam(value="machine")
String machineId,
SetMembershipStatusRequest request)
Copyright © 2011–2017 Elastisys. All rights reserved.