Class IndexCache

java.lang.Object
org.basex.index.IndexCache

public final class IndexCache extends Object
This class caches sizes and offsets from index results.
Author:
BaseX Team 2005-21, BSD License, Dimitar Popov
  • Constructor Details

    • IndexCache

      public IndexCache()
  • Method Details

    • get

      public IndexEntry get(byte[] key)
      Gets cached entry for the specified key.
      Parameters:
      key - key
      Returns:
      cached entry or null if the entry is stale
    • add

      public IndexEntry add(byte[] key, int count, long offset)
      Adds a new cache entry. If an entry with the specified key already exists, it will be updated.
      Parameters:
      key - key
      count - number of index hits
      offset - offset to id list
      Returns:
      cache entry
    • delete

      public void delete(byte[] key)
      Deletes a cached entry.
      Parameters:
      key - key