Class CollectionSpec
- java.lang.Object
-
- com.couchbase.client.java.manager.collection.CollectionSpec
-
public class CollectionSpec extends Object
TheCollectionSpecdescribes properties of a collection that can be managed.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static CollectionSpeccreate(String name)Creates a newCollectionSpecusing the default scope.static CollectionSpeccreate(String name, String scopeName)Creates a newCollectionSpecwith default properties.static CollectionSpeccreate(String name, String scopeName, Duration maxExpiry)Creates a newCollectionSpecwith a custom max expiry.static CollectionSpeccreate(String name, Duration maxExpiry)Creates a newCollectionSpecwith a custom max expiry on the default scope.booleanequals(Object o)inthashCode()DurationmaxExpiry()The max expiry for this collection,Duration.ZEROotherwise.Stringname()The name of the collection.StringscopeName()The name of the parent scope.StringtoString()
-
-
-
Method Detail
-
create
public static CollectionSpec create(String name)
Creates a newCollectionSpecusing the default scope.- Parameters:
name- the name of the collection.- Returns:
- the created
CollectionSpec.
-
create
public static CollectionSpec create(String name, String scopeName)
Creates a newCollectionSpecwith default properties.- Parameters:
name- the name of the collection.scopeName- the name of the parent scope.- Returns:
- the created
CollectionSpec.
-
create
@Volatile public static CollectionSpec create(String name, Duration maxExpiry)
Creates a newCollectionSpecwith a custom max expiry on the default scope.- Parameters:
name- the name of the collection.maxExpiry- the maximum expiry (ttl) to use for this collection.- Returns:
- the created
CollectionSpec.
-
create
@Volatile public static CollectionSpec create(String name, String scopeName, Duration maxExpiry)
Creates a newCollectionSpecwith a custom max expiry.- Parameters:
name- the name of the collection.scopeName- the name of the parent scope.maxExpiry- the maximum expiry (ttl) to use for this collection.- Returns:
- the created
CollectionSpec.
-
name
public String name()
The name of the collection.
-
scopeName
public String scopeName()
The name of the parent scope.
-
maxExpiry
@Volatile public Duration maxExpiry()
The max expiry for this collection,Duration.ZEROotherwise.
-
-