public interface ContainerApi
org.jclouds.openstack.swift.SwiftClient
in jclouds 2.0 and it is recommended you adopt it sooner than later.Modifier and Type | Method and Description |
---|---|
boolean |
create(String containerName)
Creates a container, if not already present.
|
boolean |
create(String containerName,
CreateContainerOptions options)
Creates a container, if not already present.
|
boolean |
createIfAbsent(String containerName,
CreateContainerOptions options)
Deprecated.
Please use either
create(String) or create(String, CreateContainerOptions)
as this method will be removed in jclouds 1.8. |
boolean |
deleteIfEmpty(String containerName)
Deletes a
Container , if empty. |
boolean |
deleteMetadata(String containerName,
Map<String,String> metadata)
Deletes
Container metadata. |
Container |
get(String containerName)
Gets the
Container . |
Container |
head(String containerName)
Deprecated.
Please use
get(String) as this method will be removed in jclouds 1.8. |
com.google.common.collect.FluentIterable<Container> |
list()
Lists up to 10,000 containers.
|
com.google.common.collect.FluentIterable<Container> |
list(ListContainerOptions options)
Lists containers with the supplied
ListContainerOptions . |
boolean |
update(String containerName,
UpdateContainerOptions options)
Updates the
Container . |
boolean |
updateMetadata(String containerName,
Map<String,String> metadata)
Creates or updates the
Container metadata. |
@Named(value="container:list") com.google.common.collect.FluentIterable<Container> list()
Container
objects without metadata. To retrieve
the Container
metadata, use the get(String)
method.
containers
ordered by name.@Named(value="container:list") com.google.common.collect.FluentIterable<Container> list(ListContainerOptions options)
ListContainerOptions
.
Container
objects without metadata. To retrieve
the Container
metadata, use the get(String)
method.
options
- the options to control the output list.containers
ordered by name.@Named(value="container:create") boolean create(String containerName)
containerName
- corresponds to Container.getName()
.true
if the container was created, false
if the container already existed.@Named(value="container:create") boolean create(String containerName, CreateContainerOptions options)
containerName
- corresponds to Container.getName()
.options
- the options to use when creating the container.true
if the container was created, false
if the container already existed.@Named(value="container:get") @Nullable Container get(String containerName)
Container
.containerName
- corresponds to Container.getName()
.Container
, or null
if not found.@Named(value="container:update") boolean update(String containerName, UpdateContainerOptions options)
Container
.containerName
- the container name corresponding to Container.getName()
.options
- the container options to update.true
if the container metadata was successfully created or updated,
false
if not.@Named(value="container:updateMetadata") boolean updateMetadata(String containerName, Map<String,String> metadata)
Container
metadata.containerName
- the container name corresponding to Container.getName()
.metadata
- the container metadata to create or update.true
if the container metadata was successfully created or updated,
false
if not.@Named(value="container:deleteMetadata") boolean deleteMetadata(String containerName, Map<String,String> metadata)
Container
metadata.containerName
- corresponds to Container.getName()
.metadata
- the container metadata to delete.true
if the container metadata was successfully deleted,
false
if not.@Named(value="container:deleteIfEmpty") boolean deleteIfEmpty(String containerName) throws IllegalStateException
Container
, if empty.containerName
- corresponds to Container.getName()
.false
if the container was not present.IllegalStateException
- if the container was not empty.@Deprecated @Named(value="container:createIfAbsent") boolean createIfAbsent(String containerName, CreateContainerOptions options)
create(String)
or create(String, CreateContainerOptions)
as this method will be removed in jclouds 1.8.containerName
- corresponds to Container.getName()
.options
- the options to use when creating the container.true
if the container was created, false
if the container already existed.@Deprecated @Named(value="container:get") @Nullable Container head(String containerName)
get(String)
as this method will be removed in jclouds 1.8.Container
metadata, including the number of objects in the container and
the total bytes for all objects stored in the container.containerName
- corresponds to Container.getName()
.Container
, or null
if not found.Copyright © 2009-2014 The Apache Software Foundation. All Rights Reserved.