Package com.netrics.likeit

## Class NetricsTableStats

- java.lang.Object
- - com.netrics.likeit.NetricsTableStats

- All Implemented Interfaces:
    `NetricsCommonStats`, `java.io.Serializable`

      public class NetricsTableStats
      extends java.lang.Object
      implements java.io.Serializable

  This class contains statistics on a table in the ibi™ Patterns - Search server.
  It can be used to get information about the size and structure of the table.
  The tblload, tblmove, list, recget, recreplace, recupdate, recdelete, and recadd methods all return a NetricsTableStats object.
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `NetricsTableStats()` | Creates empty object.
    `NetricsTableStats​(NetricsLpar lpar, java.lang.String s)` | Creates object with given parameters.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `java.lang.String[]` | `getCharMaps()` | Return the name of the character map for each field of the table.
    `java.lang.String` | `getCheckpointStatus()` | Return the status of any checkpoint for this table.
    `java.lang.String[]` | `getChildTables()` | Get the child tables of this table.
    `int[]` | `getFieldBytes()` | Returns the total number of bytes in each field.
    `int[]` | `getFieldChars()` | Returns the total number of characters in each field.
    `java.lang.String[]` | `getFieldNames()` | Return the names of the fields of the table.
    `int[]` | `getFieldTypes()` | Return the types of the fields of the table.
    `int[]` | `getGpuDevices()` | If the table is GIP-indexed and GPU-acceleration is enabled, returns the id's of the harnessed GPU devices.
    `int` | `getHeaderBytes()` | Return the total size of the overhead for a table (in kbytes).
    `int` | `getIdxBytes()` | Return the total size of the indexing information for the table (in kbytes).
    `int` | `getIdxGpuBytes()` |
    `boolean` | `getIsChild()` | Returns true if the table is child table
    `boolean` | `getIsGpuIndexed()` |
    `boolean` | `getIsParent()` | Returns true if the table is a parent table
    `int` | `getKeyTreeBytes()` | Return the total size of the tree structure which holds the record keys for the table (in kbytes).
    `java.lang.String` | `getLayout()` | Deprecated. Deprecated since 5.6.
    `java.lang.String` | `getName()` | Return the name of the table.
    `int` | `getNumRecs()` | Return the number of records currently in the table.
    `java.lang.String` | `getParentTableName()` | If the table is child table, returns the name of the parent table.
    `int` | `getPhoneticGipBytes()` | Return the total size of the indexing information for the table for the "phoneticized records" (in kbytes).
    `int` | `getProcBytes()` | Return the total memory used by the process (in kbytes).
    `int[]` | `getPsiEncodingDensities()` | If the table is PSI-indexed, returns the suffix densities of the PSI encodings.
    `int` | `getRecFieldBytes()` | Return the total size of the overhead for storing the field structure of the table (in kbytes).
    `java.lang.String` | `getTblInfo()` | Return the table info field for this table.
    `int` | `getTotalBytes()` | Return the total size of the table, all structures included (in kbytes).
    `int` | `getTranId()` | Deprecated. Use `NetricsCommonStats.getTransactionId()` to obtain the full transaction id.
    `long` | `getTransactionId()` | Returns the full ID of the transaction that owns or claim this item.
    `int` | `getTranState()` | Returns the transaction state for this object.
    `boolean` | `isDirty()` | Returns true if this item is dirty.
    `boolean` | `isGipFiltered()` | Return whether or not the GIP filter is turned on for the table.
    `boolean` | `isGpuEnabled()` | Return whether or not GPU-accelerated indexing is turned on for the table.
    `boolean` | `isHeld()` | Returns true if this object is held by an open transaction.
    `boolean` | `isPhonetic()` | Return whether phonetics is turned on for the table.
    `boolean` | `isPsiFiltered()` | Return whether or not the PSI filter is turned on for the table.
    `boolean` | `isSortFiltered()` | Return whether or not the SORT filter is turned on for the table.
    `boolean` | `isUpdated()` | Returns true if this item is updated by an open transaction.
    `java.lang.String` | `toString()` |

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### NetricsTableStats

          public NetricsTableStats​(NetricsLpar lpar,
                                   java.lang.String s)

      Creates object with given parameters. For internal use.
      Parameters:
        `lpar` - - table stats LPar.
        `s` - - unused.

    - #### NetricsTableStats

          public NetricsTableStats()

      Creates empty object. For internal use.

  - ### Method Detail

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`

    - #### getName

          public java.lang.String getName()

      Return the name of the table.
      Returns:
        the name of the table.

    - #### getTblInfo

          public java.lang.String getTblInfo()

      Return the table info field for this table. It will be null if no table info was specified at load time.
      Returns:
        the table info field for this table.

    - #### getFieldNames

          public java.lang.String[] getFieldNames()

      Return the names of the fields of the table. This should be the same array of field names that was specified at load time.
      Returns:
        an array of field names, one for each field of the table. Returns null if no table statistics are stored.

    - #### getCharMaps

          public java.lang.String[] getCharMaps()

      Return the name of the character map for each field of the table.
      Returns:
        an array of character map names, one for each field of the table. Returns null if no table statistics are stored.

    - #### getFieldTypes

          public int[] getFieldTypes()

      Return the types of the fields of the table. This is the same array of field types that was specified at load time.
      Returns:
        an array of field types, one for each field of the table. Returns null if no table statistics are stored.

    - #### getNumRecs

          public int getNumRecs()

      Return the number of records currently in the table.
      Returns:
        a count of records

    - #### getKeyTreeBytes

          public int getKeyTreeBytes()

      Return the total size of the tree structure which holds the record keys for the table (in kbytes).
      Returns:
        memory usage in k-bytes

    - #### getRecFieldBytes

          public int getRecFieldBytes()

      Return the total size of the overhead for storing the field structure of the table (in kbytes).
      Returns:
        memory usage in k-bytes

    - #### getHeaderBytes

          public int getHeaderBytes()

      Return the total size of the overhead for a table (in kbytes).
      Returns:
        memory usage in k-bytes

    - #### getFieldBytes

          public int[] getFieldBytes()

      Returns the total number of bytes in each field.
      Returns:
        an array of memory usages in k-bytes. Returns null if no table statistics are stored.

    - #### getFieldChars

          public int[] getFieldChars()

      Returns the total number of characters in each field.
      Returns:
        an array of characer counts, in thousands. Returns null if no table statistics are stored.

    - #### isGipFiltered

          public boolean isGipFiltered()

      Return whether or not the GIP filter is turned on for the table. The GIP filter is a search accelerator for large tables.
      Returns:
        true if the GIP filter is turned on for the table.

    - #### isGpuEnabled

          public boolean isGpuEnabled()

      Return whether or not GPU-accelerated indexing is turned on for the table. GPU-accelerated indexing can apply to the GIP filter on large tables.
      Returns:
        true if GPU-accelerated indexing is turned on for the table.

    - #### getGpuDevices

          public int[] getGpuDevices()

      If the table is GIP-indexed and GPU-acceleration is enabled, returns the id's of the harnessed GPU devices. Returns null if the table is not GIP-indexed, or GPU-acceleration is not enabled. Returns null if the table is harnessed to the default device set; in this case the default device set can be retrieved using `NetricsServerInterface.server_info()`
      Returns:
        a list of GPU devices, or null if such list is not stored.

    - #### isSortFiltered

          public boolean isSortFiltered()

      Return whether or not the SORT filter is turned on for the table. The SORT filter is a search accelerator for large tables.
      Returns:
        true if the SORT filter is turned on for the table. Returns null if no table statistics are stored.

    - #### isPsiFiltered

          public boolean isPsiFiltered()

      Return whether or not the PSI filter is turned on for the table. The PSI filter is a search accelerator for large tables.
      Returns:
        true if the PSI filter is turned on for the table.

    - #### getIdxBytes

          public int getIdxBytes()

      Return the total size of the indexing information for the table (in kbytes). This includes the indexes for the search accelerator filters (GIP or SORT) and any predicate indexes.
      Returns:
        total size of the indexing information for the table (in kbytes).

    - #### getIdxGpuBytes

          public int getIdxGpuBytes()

      Returns:
        the size of GPU indexing information for the table (in kbytes).

    - #### isPhonetic

          public boolean isPhonetic()

      Return whether phonetics is turned on for the table. Currently phonetics is not supported and this is always false.
      Returns:
        whether phonetics is turned on for the table.

    - #### getPhoneticGipBytes

          public int getPhoneticGipBytes()

      Return the total size of the indexing information for the table for the "phoneticized records" (in kbytes). Currently phonetics is not supported and this is always zero.
      Returns:
        the total size of the indexing information for the table for the "phoneticized records" (in kbytes).

    - #### getTotalBytes

          public int getTotalBytes()

      Return the total size of the table, all structures included (in kbytes). This is roughly the sum of the other statistics.
      Returns:
        the total size of the table, all structures included (in kbytes).

    - #### getProcBytes

          public int getProcBytes()

      Return the total memory used by the process (in kbytes). This is roughly the sum of the memory use of each table. Available only on LINUX platforms. If the server resides on any other platform this value is -1.
      Returns:
        the total memory used by the process (in kbytes).

    - #### getIsParent

          public boolean getIsParent()

      Returns true if the table is a parent table
      Returns:
        true if the table is a parent table

    - #### getIsChild

          public boolean getIsChild()

      Returns true if the table is child table
      Returns:
        true if the table is child table

    - #### getParentTableName

          public java.lang.String getParentTableName()

      If the table is child table, returns the name of the parent table. Returns null if the table is not a child table.
      Returns:
        the name of the parent table, null if not a child.

    - #### getPsiEncodingDensities

          public int[] getPsiEncodingDensities()

      If the table is PSI-indexed, returns the suffix densities of the PSI encodings.
      Returns:
        suffix densities of the PSI encodings. Returns null if the table is not PSI-indexed.

    - #### getChildTables

          public java.lang.String[] getChildTables()

      Get the child tables of this table. This returns a list of the child tables of this table.
      Returns:
        A string array of the child tables for this parent table. If this is not a parent table null is returned. If this table has no child tables either null or an empty list may be returned.

    - #### getIsGpuIndexed

          public boolean getIsGpuIndexed()

      Returns:
        true if GPU-accelerated indexing is enabled for the table.

    - #### getTranState

          public int getTranState()

      Returns the transaction state for this object. If this object is not associated with a transaction this returns the special value NetricsTranStats.STATE_NULL. Otherwise it is an OR'd combination of one or more of the state values defined in NetricsTranStats.
      Specified by:
        `getTranState` in interface `NetricsCommonStats`
      Returns:
        the transaction state.

    - #### isDirty

          public boolean isDirty()

      Returns true if this item is dirty. This return trues if this item has been modified by a transaction that is not yet committed or aborted. Dirty items may not be trustworthy as the modifications may not be complete and may get rolled back if the transaction is aborted.
      Specified by:
        `isDirty` in interface `NetricsCommonStats`
      Returns:
        the dirty flag of the object.

    - #### isUpdated

          public boolean isUpdated()

      Returns true if this item is updated by an open transaction. This is not the same as the isDirty value, as an object is dirty if it was replaced, renamed, added or deleted in addition to updated. Updated indicates that some portion of the item was modified.
      Specified by:
        `isUpdated` in interface `NetricsCommonStats`
      Returns:
        the updated flag of the object.

    - #### isHeld

          public boolean isHeld()

      Returns true if this object is held by an open transaction. Held means it is being held in association with updates to another item, but it is not itself modified by the transaction. However another operation may have modified this item, so both isHeld and isDirty may return true.
      Specified by:
        `isHeld` in interface `NetricsCommonStats`
      Returns:
        the held flag of the object

    - #### getTranId

          public int getTranId()

      Deprecated.
      Use `NetricsCommonStats.getTransactionId()` to obtain the full transaction id.
      Returns a partial 32-bit id of the transaction that owns or claim this item. If this item has not been modified or held by an open transaction this will be equal to NetricsTranStats.TRAN_ID_NULL (zero).
      Specified by:
        `getTranId` in interface `NetricsCommonStats`
      Returns:
        a full transaction id.

    - #### getTransactionId

          public long getTransactionId()

      Returns the full ID of the transaction that owns or claim this item. If this item has not been modified or held by an open transaction this will be equal to NetricsTranStats.TRAN_ID_NULL (zero).
      Specified by:
        `getTransactionId` in interface `NetricsCommonStats`
      Returns:
        a full transaction id.

    - #### getLayout

          @Deprecated
          public java.lang.String getLayout()

      Deprecated.
      Deprecated since 5.6. This function always returns null.
      Specified by:
        `getLayout` in interface `NetricsCommonStats`
      Returns:
        null

    - #### getCheckpointStatus

          public java.lang.String getCheckpointStatus()

      Return the status of any checkpoint for this table. This returns a description of the checkpoint status for a file. The possible return values are:
      Last Checkpoint: yyyy/mm/dd-HH:MM:SS if the table was checkpointed
      Never Checkpointed if the table is not checkpointed
      Checkpoints Disabled if checkpointing is not enabled on this server
      No Checkpoint Info if there was an error
      Returns:
        the checkpoint status of this table.