public class IndexOptions
extends java.lang.Object
Represents options to apply while creating an Index
.
PersistentCollection.createIndex(String, IndexOptions)
Constructor and Description |
---|
IndexOptions() |
Modifier and Type | Method and Description |
---|---|
IndexType |
getIndexType()
Specifies the type of an index to create.
|
static IndexOptions |
indexOptions(IndexType indexType)
Creates an
IndexOptions with the specified indexType . |
static IndexOptions |
indexOptions(IndexType indexType,
boolean async)
|
boolean |
isAsync()
Indicates whether an index to be created in a non-blocking
way.
|
void |
setAsync(boolean async)
Indicates whether an index to be created in a non-blocking
way.
|
void |
setIndexType(IndexType indexType)
Specifies the type of an index to create.
|
public static IndexOptions indexOptions(IndexType indexType)
Creates an IndexOptions
with the specified indexType
. Index creation
will be synchronous with this option.
indexType
- the type of index to be created.public static IndexOptions indexOptions(IndexType indexType, boolean async)
Creates an IndexOptions
with the specified indexType
and async
flag.
indexType
- the type of index to be created.async
- if set to true
then the index would be created asynchronously;
otherwise synchronously.@Generated(value="lombok") public IndexType getIndexType()
Specifies the type of an index to create.
@Generated(value="lombok") public void setIndexType(IndexType indexType)
Specifies the type of an index to create.
indexType
- type of an index.@Generated(value="lombok") public boolean isAsync()
Indicates whether an index to be created in a non-blocking way.
otherwise create index operation will wait until all existing documents are indexed.
@Generated(value="lombok") public void setAsync(boolean async)
Indicates whether an index to be created in a non-blocking way.
async
- if set to true
then the index will be created asynchronously;
otherwise create index operation will wait until all existing
documents are indexed.PersistentCollection.createIndex(String, IndexOptions)