Class Datas

java.lang.Object
org.basex.core.Datas

public final class Datas extends Object
This class organizes currently opened databases.
Author:
BaseX Team 2005-21, BSD License, Christian Gruen
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    pin(String name)
    Pins and returns a database with the specified name.
    void
    pin(Data data)
    Pins a data reference.
    int
    pins(String name)
    Returns the number of pins for the database with the specified name, or 0 if the database is not opened.
    void
    unpin(Data data)
    Unpins a data reference and closes the database if no references exist anymore.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Datas

      public Datas()
  • Method Details

    • pin

      public Data pin(String name)
      Pins and returns a database with the specified name.
      Parameters:
      name - name of the database
      Returns:
      data reference, or null if the database is not registered
    • pin

      public void pin(Data data)
      Pins a data reference.
      Parameters:
      data - data reference
    • unpin

      public void unpin(Data data)
      Unpins a data reference and closes the database if no references exist anymore.
      Parameters:
      data - data reference
    • pins

      public int pins(String name)
      Returns the number of pins for the database with the specified name, or 0 if the database is not opened.
      Parameters:
      name - name of the database
      Returns:
      number of references