public class JdbmMasterTable<E> extends JdbmTable<Long,E> implements MasterTable<E>
Modifier and Type | Field and Description |
---|---|
protected JdbmTable<String,String> |
adminTbl |
DBF, SEQPROP_KEY
Modifier | Constructor and Description |
---|---|
|
JdbmMasterTable(RecordManager recMan,
org.apache.directory.shared.ldap.schema.SchemaManager schemaManager)
Creates the master table using JDBM B+Trees for the backing store.
|
protected |
JdbmMasterTable(RecordManager recMan,
org.apache.directory.shared.ldap.schema.SchemaManager schemaManager,
String dbName,
Serializer serializer) |
Modifier and Type | Method and Description |
---|---|
void |
delete(Long id)
Deletes a ServerEntry from the master table at an index specified by id.
|
E |
get(Long id)
Gets the ServerEntry from this MasterTable.
|
Long |
getCurrentId()
Gets the value of the id sequence from this MasterTable's sequence
without affecting the value.
|
Long |
getNextId()
Get's the next value from this SequenceBDb.
|
String |
getProperty(String property)
Gets a persistent property stored in the admin table of this MasterTable.
|
void |
put(Long id,
E entry)
Puts the ServerEntry into this master table at an index
specified by id.
|
void |
setProperty(String property,
String value)
Sets a persistent property stored in the admin table of this MasterTable.
|
close, count, count, cursor, cursor, getKeyComparator, getKeySerializer, getMarshaller, getName, getValueComparator, getValueSerializer, greaterThanCount, has, has, hasGreaterOrEqual, hasGreaterOrEqual, hasLessOrEqual, hasLessOrEqual, isCountExact, isDupsEnabled, lessThanCount, remove, remove, sync, valueCursor
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
close, count, count, cursor, cursor, getKeyComparator, getName, getValueComparator, greaterThanCount, has, has, hasGreaterOrEqual, hasGreaterOrEqual, hasLessOrEqual, hasLessOrEqual, isCountExact, isDupsEnabled, lessThanCount, remove, remove, valueCursor
public JdbmMasterTable(RecordManager recMan, org.apache.directory.shared.ldap.schema.SchemaManager schemaManager) throws Exception
recMan
- the JDBM record managerschemaManager
- the schema mamangerException
- if there is an error opening the Db file.protected JdbmMasterTable(RecordManager recMan, org.apache.directory.shared.ldap.schema.SchemaManager schemaManager, String dbName, Serializer serializer) throws Exception
Exception
public E get(Long id) throws Exception
get
in interface MasterTable<E>
get
in interface Table<Long,E>
get
in class JdbmTable<Long,E>
id
- the Long id of the entry to retrieve.Exception
- if there is a read error on the underlying Db.public void put(Long id, E entry) throws Exception
put
in interface MasterTable<E>
put
in interface Table<Long,E>
put
in class JdbmTable<Long,E>
entry
- the ServerEntry w/ operational attributesid
- the Long id of the entry to putException
- if there is a write error on the underlying Db.Table.put(java.lang.Object,
java.lang.Object)
public void delete(Long id) throws Exception
delete
in interface MasterTable<E>
id
- the Long id of the entry to deleteException
- if there is a write error on the underlying Dbpublic Long getCurrentId() throws Exception
MasterTable
getCurrentId
in interface MasterTable<E>
Exception
- if the admin table storing sequences cannot be readpublic Long getNextId() throws Exception
getNextId
in interface MasterTable<E>
Exception
- if the admin table storing sequences cannot be
read and written to.public String getProperty(String property) throws Exception
getProperty
in interface MasterTable<E>
property
- the key of the property to get the value ofException
- when the underlying admin table cannot be readpublic void setProperty(String property, String value) throws Exception
setProperty
in interface MasterTable<E>
property
- the key of the property to set the value ofvalue
- the value of the propertyException
- when the underlying admin table cannot be writenCopyright © 2003-2012 Apache Software Foundation. All Rights Reserved.