Interface IBmPersistentStringRegistry

All Superinterfaces:
AutoCloseable, Closeable

public interface IBmPersistentStringRegistry extends Closeable
Persistent string registry.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Closes the registry.
    getId(String string)
    Gets the ID of the specified string.
    Gets string by ID.
  • Method Details

    • getId

      Integer getId(String string) throws IOException
      Gets the ID of the specified string. First check is performed if the string has already been assigned an ID. If it has, the ID is returned. Otherwise the string is assigned next free ID and the ID is returned.
      Parameters:
      string - The string. May not be null.
      Returns:
      the ID or null if there are no free identifiers left.
      Throws:
      IOException - if any I/O error occurs.
    • getString

      String getString(Integer id) throws IOException
      Gets string by ID.
      Parameters:
      id - The ID.
      Returns:
      the string or null if there is no string with the specified ID.
      Throws:
      IOException - if any I/O error occurs.
    • close

      void close() throws IOException
      Closes the registry.
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Throws:
      IOException - if any I/O error occurs.