public interface NodeApi
Modifier and Type | Method and Description |
---|---|
Set<Node> |
add(Iterable<AddNode> addNodes)
Add a new node with the configuration defined by the request.
|
Metadata |
createMetadata(int id,
Map<String,String> metadata)
When a metadata item is added, it is assigned a unique identifier that can be used for mutating operations such
as changing the value attribute or removing it.
|
boolean |
deleteMetadata(int id,
Iterable<Integer> metadataIds)
Batch delete metadata given the specified ids.
|
boolean |
deleteMetadatum(int id,
int metadatumId)
Delete metadatum.
|
Node |
get(int id)
Get a node.
|
Metadata |
getMetadata(int lb)
List a load balancer's metadata.
|
PagedIterable<Node> |
list()
List the nodes.
|
IterableWithMarker<Node> |
list(PaginationOptions options)
List the nodes with full control of pagination.
|
void |
remove(int id)
Remove a node from the load balancer.
|
void |
remove(Iterable<Integer> ids)
Batch remove nodes from the load balancer.
|
void |
update(int id,
UpdateNode updateNode)
Update the attributes of a node.
|
boolean |
updateMetadatum(int id,
int metadatumId,
String value)
Update metadatum.
|
@Named(value="node:add") @POST @Consumes(value="application/json") @Path(value="/nodes") Set<Node> add(Iterable<AddNode> addNodes)
@Named(value="node:update") @PUT @Consumes(value="application/json") @Path(value="/nodes/{id}") void update(@PathParam(value="id") int id, UpdateNode updateNode)
@Named(value="node:list") @GET @Consumes(value="application/json") @Path(value="/nodes") PagedIterable<Node> list()
@Named(value="node:list") @GET @Consumes(value="application/json") @Path(value="/nodes") IterableWithMarker<Node> list(PaginationOptions options)
@Named(value="node:get") @GET @Consumes(value="application/json") @Path(value="/nodes/{id}") Node get(@PathParam(value="id") int id)
@Named(value="node:remove") @DELETE @Path(value="/nodes/{id}") @Consumes(value="*/*") void remove(@PathParam(value="id") int id)
@Named(value="node:remove") @DELETE @Path(value="/nodes") @Consumes(value="*/*") void remove(@QueryParam(value="id") Iterable<Integer> ids)
@Named(value="node:createmetadata") @POST @Consumes(value="application/json") @Path(value="/nodes/{id}/metadata") Metadata createMetadata(@PathParam(value="id") int id, Map<String,String> metadata)
@Named(value="node:getmetadata") @GET @Consumes(value="application/json") @Path(value="/nodes/{id}/metadata") Metadata getMetadata(@PathParam(value="id") int lb)
@Named(value="node:updatemetadatum") @PUT @Produces(value="application/json") @Consumes(value="*/*") @Path(value="/nodes/{id}/metadata/{metadatumId}") boolean updateMetadatum(@PathParam(value="id") int id, @PathParam(value="metadatumId") int metadatumId, String value)
@Named(value="node:deletemetadatum") @DELETE @Consumes(value="*/*") @Path(value="/nodes/{id}/metadata/{metadatumId}") boolean deleteMetadatum(@PathParam(value="id") int id, @PathParam(value="metadatumId") int metadatumId)
deleteMetadata(int, Iterable)
@Named(value="node:deletemetadata") @DELETE @Consumes(value="*/*") @Path(value="/nodes/{id}/metadata") boolean deleteMetadata(@PathParam(value="id") int id, @QueryParam(value="id") Iterable<Integer> metadataIds)
Copyright © 2009-2018 The Apache Software Foundation. All Rights Reserved.