org.apache.directory.server.core.partition.impl.btree
Interface MasterTable

All Superinterfaces:
Table
All Known Implementing Classes:
JdbmMasterTable

public interface MasterTable
extends Table

The master table used to store the Attributes of entries.

Version:
$Rev: 493916 $
Author:
Apache Directory Project

Field Summary
static java.lang.String DBF
          the name of the dbf file for this table
static java.lang.String SEQPROP_KEY
          the sequence key - stores last sequence value in the admin table
 
Method Summary
 javax.naming.directory.Attributes delete(java.math.BigInteger id)
          Deletes a entry from the master table at an index specified by id.
 javax.naming.directory.Attributes get(java.math.BigInteger id)
          Gets the Attributes of an entry from this MasterTable.
 java.math.BigInteger getCurrentId()
          Get's the current id value from this master database's sequence without affecting the seq.
 java.math.BigInteger getNextId()
          Get's the next value from this SequenceBDb.
 java.lang.String getProperty(java.lang.String property)
          Gets a persistant property stored in the admin table of this MasterTable.
 javax.naming.directory.Attributes put(javax.naming.directory.Attributes entry, java.math.BigInteger id)
          Puts the Attributes of an entry into this master table at an index specified by id.
 void setProperty(java.lang.String property, java.lang.String value)
          Sets a persistant property stored in the admin table of this MasterTable.
 
Methods inherited from interface org.apache.directory.server.core.partition.impl.btree.Table
close, count, count, count, get, getComparator, getName, getRenderer, has, has, has, has, isDupsEnabled, isSortedDupsEnabled, listTuples, listTuples, listTuples, listTuples, listValues, put, put, remove, remove, remove, setRenderer
 

Field Detail

DBF

static final java.lang.String DBF
the name of the dbf file for this table

See Also:
Constant Field Values

SEQPROP_KEY

static final java.lang.String SEQPROP_KEY
the sequence key - stores last sequence value in the admin table

See Also:
Constant Field Values
Method Detail

get

javax.naming.directory.Attributes get(java.math.BigInteger id)
                                      throws javax.naming.NamingException
Gets the Attributes of an entry from this MasterTable.

Parameters:
id - the BigInteger id of the entry to retrieve.
Returns:
the Attributes of the entry with operational attributes and all.
Throws:
javax.naming.NamingException - if there is a read error on the underlying Db.

put

javax.naming.directory.Attributes put(javax.naming.directory.Attributes entry,
                                      java.math.BigInteger id)
                                      throws javax.naming.NamingException
Puts the Attributes of an entry into this master table at an index specified by id. Used both to create new entries and update existing ones.

Parameters:
entry - the Attributes of entry w/ operational attributes
id - the BigInteger id of the entry to put
Returns:
the newly created entry's Attributes
Throws:
javax.naming.NamingException - if there is a write error on the underlying Db.

delete

javax.naming.directory.Attributes delete(java.math.BigInteger id)
                                         throws javax.naming.NamingException
Deletes a entry from the master table at an index specified by id.

Parameters:
id - the BigInteger id of the entry to delete
Returns:
the Attributes of the deleted entry
Throws:
javax.naming.NamingException - if there is a write error on the underlying Db

getCurrentId

java.math.BigInteger getCurrentId()
                                  throws javax.naming.NamingException
Get's the current id value from this master database's sequence without affecting the seq.

Returns:
the current value.
Throws:
javax.naming.NamingException - if the admin table storing sequences cannot be read.

getNextId

java.math.BigInteger getNextId()
                               throws javax.naming.NamingException
Get's the next value from this SequenceBDb. This has the side-effect of changing the current sequence values perminantly in memory and on disk.

Returns:
the current value incremented by one.
Throws:
javax.naming.NamingException - if the admin table storing sequences cannot be read and writen to.

getProperty

java.lang.String getProperty(java.lang.String property)
                             throws javax.naming.NamingException
Gets a persistant property stored in the admin table of this MasterTable.

Parameters:
property - the key of the property to get the value of
Returns:
the value of the property
Throws:
javax.naming.NamingException - when the underlying admin table cannot be read

setProperty

void setProperty(java.lang.String property,
                 java.lang.String value)
                 throws javax.naming.NamingException
Sets a persistant property stored in the admin table of this MasterTable.

Parameters:
property - the key of the property to set the value of
value - the value of the property
Throws:
javax.naming.NamingException - when the underlying admin table cannot be writen


Copyright © 2003-2012 Apache Software Foundation. All Rights Reserved.