Class CollectionSpec
- java.lang.Object
-
- com.couchbase.client.java.manager.collection.CollectionSpec
-
public class CollectionSpec extends Object
TheCollectionSpec
describes properties of a collection that can be managed.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods 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 Detail
-
create
public static CollectionSpec create(String name, String scopeName)
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
@Volatile public static CollectionSpec create(String name, String scopeName, Duration maxExpiry)
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
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.ZERO
otherwise.
-
-