Interface Index


  • public interface Index
    An index that is built over the data stored in a GemFire Region.

    For a description of the types of indexes that GemFire currently supports, see IndexType.

    An index is specified using a name, indexedExpression, fromClause, and optionally a projectionAttributes.

    The name uniquely identifies the index to for the statistics services in GemFire.

    The indexedExpression is the lookup value for the index. The way that an indexedExpression is specified and used varies depending on the type of index. For more information, see IndexType.

    The fromClause specifies the collection(s) of objects that the index ranges over, and must contain one and only one region path.

    The optional projectAttributes specifies a tranformation that is done on the values and is used for pre-computing a corresponding projection as defined in a query.

    Since:
    GemFire 4.0
    See Also:
    QueryService.createIndex(String, IndexType, String, String), IndexType
    • Method Detail

      • getName

        java.lang.String getName()
        Returns the unique name of this index
        Returns:
        the unique name of this index
      • getType

        IndexType getType()
        Get the index type
        Returns:
        the type of index
      • getRegion

        Region<?,​?> getRegion()
        The Region this index is on
        Returns:
        the Region for this index
      • getStatistics

        IndexStatistics getStatistics()
        Get statistics information for this index.
        Returns:
        statistics information for this index
        Throws:
        java.lang.UnsupportedOperationException - for indexes created on Maps. Example: Index on Maps with expression p['key'].
        On Map type indexes the stats are created at individual key level that can be viewed in VSD stats.
      • getFromClause

        java.lang.String getFromClause()
        Get the original fromClause for this index.
        Returns:
        the original fromClause for this index
      • isValid

        default boolean isValid()
        Get whether index is valid to be used in queries.
        Returns:
        whether index is valid to be used in queries
      • getCanonicalizedFromClause

        java.lang.String getCanonicalizedFromClause()
        Get the canonicalized fromClause for this index.
        Returns:
        the canonicalized fromClause for this index
      • getIndexedExpression

        java.lang.String getIndexedExpression()
        Get the original indexedExpression for this index.
        Returns:
        the original indexedExpression for this index
      • getCanonicalizedIndexedExpression

        java.lang.String getCanonicalizedIndexedExpression()
        Get the canonicalized indexedExpression for this index.
        Returns:
        the canonicalized indexedExpression for this index
      • getProjectionAttributes

        java.lang.String getProjectionAttributes()
        Get the original projectionAttributes for this expression.
        Returns:
        the projectionAttributes, or "*" if there were none specified at index creation.
      • getCanonicalizedProjectionAttributes

        java.lang.String getCanonicalizedProjectionAttributes()
        Get the canonicalized projectionAttributes for this expression.
        Returns:
        the projectionAttributes, or "*" if there were none specified at index creation.