Top Description Fields Constructors Methods
org.h2.table

public final Class IndexHints

extends Object
Class Inheritance
Imports
java.util.LinkedHashSet, .Set, org.h2.index.Index

Contains the hints for which index to use for a specific table. Currently allows a list of "use indexes" to be specified.

Use the factory method IndexHints.createUseIndexHints(listOfIndexes) to limit the query planner to only use specific indexes when determining which index to use for a table

Field Summary

Modifier and TypeField and Description
private final LinkedHashSet<String>

Constructor Summary

AccessConstructor and Description
private
IndexHints(LinkedHashSet<String> allowedIndexes)

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

whether it was already allowed
allowIndex
(Index
the index
index
)

Allow an index to be used.

public static IndexHints

Returns:

the hint object
createUseIndexHints
(LinkedHashSet<String>
the set of allowed indexes
allowedIndexes
)

Create an index hint object.

public Set<String>
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

allowedIndexesback to summary
private final LinkedHashSet<String> allowedIndexes

Constructor Detail

IndexHintsback to summary
private IndexHints(LinkedHashSet<String> allowedIndexes)

Method Detail

allowIndexback to summary
public boolean allowIndex(Index index)

Allow an index to be used.

Parameters
index:Index

the index

Returns:boolean

whether it was already allowed

createUseIndexHintsback to summary
public static IndexHints createUseIndexHints(LinkedHashSet<String> allowedIndexes)

Create an index hint object.

Parameters
allowedIndexes:LinkedHashSet<String>

the set of allowed indexes

Returns:IndexHints

the hint object

getAllowedIndexesback to summary
public Set<String> getAllowedIndexes()
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object

Annotations
@Override