Class CollectionSpec
java.lang.Object
com.couchbase.client.java.manager.collection.CollectionSpec
public class CollectionSpec extends Object
The
CollectionSpec describes properties of a collection that can be managed.-
Method Summary
Modifier and Type Method Description 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.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 Details
-
create
Creates a newCollectionSpecwith default properties.- Parameters:
name- the name of the collection.scopeName- the name of the parent scope.- Returns:
- the created
CollectionSpec.
-
create
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
The name of the collection. -
scopeName
The name of the parent scope. -
maxExpiry
The max expiry for this collection,Duration.ZEROotherwise. -
toString
-
equals
-
hashCode
public int hashCode()
-