Package org.basex.core
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-24, BSD License, Christian Gruen
-
-
Constructor Summary
Constructors Constructor Description Datas()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Data
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, or0
if the database is not opened.void
unpin(Data data)
Unpins a data reference and closes the database if no references exist anymore.
-
-
-
Method Detail
-
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, or0
if the database is not opened.- Parameters:
name
- name of the database- Returns:
- number of references
-
-