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 CollectionSpec
create(String name, String scopeName)
Creates a newCollectionSpec
with default properties.static CollectionSpec
create(String name, String scopeName, Duration maxExpiry)
Creates a newCollectionSpec
with a custom max expiry.boolean
equals(Object o)
int
hashCode()
Duration
maxExpiry()
The max expiry for this collection,Duration.ZERO
otherwise.String
name()
The name of the collection.String
scopeName()
The name of the parent scope.String
toString()
-
Method Details
-
create
Creates a newCollectionSpec
with default properties.- Parameters:
name
- the name of the collection.scopeName
- the name of the parent scope.- Returns:
- the created
CollectionSpec
.
-
create
Creates a newCollectionSpec
with 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.ZERO
otherwise. -
toString
-
equals
-
hashCode
public int hashCode()
-