public class CollectionSpec extends Object
CollectionSpec describes properties of a collection that can be managed.| Modifier and Type | Method and Description |
|---|---|
static CollectionSpec |
create(String name,
String scopeName)
Creates a new
CollectionSpec with default properties. |
static CollectionSpec |
create(String name,
String scopeName,
Duration maxExpiry)
Creates a new
CollectionSpec 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() |
public static CollectionSpec create(String name, String scopeName)
CollectionSpec with default properties.name - the name of the collection.scopeName - the name of the parent scope.CollectionSpec.@Stability.Volatile public static CollectionSpec create(String name, String scopeName, Duration maxExpiry)
CollectionSpec with a custom max expiry.name - the name of the collection.scopeName - the name of the parent scope.maxExpiry - the maximum expiry (ttl) to use for this collection.CollectionSpec.public String name()
public String scopeName()
@Stability.Volatile public Duration maxExpiry()
Duration.ZERO otherwise.Copyright © 2020 Couchbase, Inc.. All rights reserved.