Class CollectionSpec
java.lang.Object
com.couchbase.client.java.manager.collection.CollectionSpec
The
CollectionSpec describes properties of a collection that can be managed.-
Method Summary
Modifier and TypeMethodDescriptionstatic CollectionSpecCreates a newCollectionSpecusing the default scope.static CollectionSpecCreates a newCollectionSpecwith default properties.static CollectionSpecCreates a newCollectionSpecwith a custom max expiry.static CollectionSpecCreates a newCollectionSpecwith a custom max expiry on the default scope.booleaninthashCode()history()whether history retention is enabled on this collection.protected static CollectionSpecinternalCreate(String name, String scopeName, Duration maxExpiry, Boolean history) Creates a newCollectionSpecwith a custom max expiry.The max expiry for this collection,Duration.ZEROotherwise.name()The name of the collection.The name of the parent scope.toString()
-
Method Details
-
create
Creates a newCollectionSpecusing the default scope.- Parameters:
name- the name of the collection.- Returns:
- the created
CollectionSpec.
-
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 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
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.
-
internalCreate
@Volatile @Internal protected static CollectionSpec internalCreate(String name, String scopeName, Duration maxExpiry, Boolean history) 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.history- whether history retention is enabled on 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. -
history
whether history retention is enabled on this collection. -
toString
-
equals
-
hashCode
public int hashCode()
-