|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.directory.server.core.partition.impl.btree.jdbm.JdbmStore<E>
public class JdbmStore<E>
Constructor Summary | |
---|---|
JdbmStore()
Creates a store based on JDBM B+Trees. |
Method Summary | |
---|---|
void |
add(org.apache.directory.shared.ldap.entry.ServerEntry entry)
Add an entry into the store. |
void |
addIndex(Index<?,E,java.lang.Long> index)
Adds a user index to the list of index for this store |
int |
count()
|
void |
delete(java.lang.Long id)
Delete the entry associated with a given Id |
void |
destroy()
Close the partition : we have to close all the userIndices and the master table. |
Index<java.lang.String,E,java.lang.Long> |
getAliasIndex()
|
int |
getCacheSize()
|
int |
getChildCount(java.lang.Long id)
|
java.lang.Long |
getDefaultId()
Gets the default ID. |
Index<java.lang.String,E,java.lang.Long> |
getEntryCsnIndex()
|
java.lang.String |
getEntryDn(java.lang.Long id)
|
java.lang.Long |
getEntryId(java.lang.String dn)
|
java.lang.String |
getEntryUpdn(java.lang.Long id)
|
java.lang.String |
getEntryUpdn(java.lang.String dn)
|
Index<java.lang.String,E,java.lang.Long> |
getEntryUuidIndex()
|
Index<?,E,java.lang.Long> |
getIndex(java.lang.String id)
Get the user or system index associated with the given name |
java.lang.String |
getName()
|
Index<java.lang.String,E,java.lang.Long> |
getNdnIndex()
|
Index<java.lang.String,E,java.lang.Long> |
getObjectClassIndex()
|
Index<java.lang.Long,E,java.lang.Long> |
getOneAliasIndex()
|
Index<java.lang.Long,E,java.lang.Long> |
getOneLevelIndex()
|
java.lang.Long |
getParentId(java.lang.Long childId)
|
java.lang.Long |
getParentId(java.lang.String dn)
Gets the Long id of an entry's parent using the child entry's normalized DN. |
Index<java.lang.String,E,java.lang.Long> |
getPresenceIndex()
|
java.lang.String |
getProperty(java.lang.String propertyName)
|
Index<java.lang.Long,E,java.lang.Long> |
getSubAliasIndex()
|
Index<java.lang.Long,E,java.lang.Long> |
getSubLevelIndex()
|
org.apache.directory.shared.ldap.name.DN |
getSuffix()
|
java.lang.String |
getSuffixDn()
|
Index<?,E,java.lang.Long> |
getSystemIndex(java.lang.String id)
Get the system index associated with the given name |
Index<java.lang.String,E,java.lang.Long> |
getUpdnIndex()
|
org.apache.directory.shared.ldap.name.DN |
getUpSuffix()
|
Index<?,E,java.lang.Long> |
getUserIndex(java.lang.String id)
Get the user index associated with the given name |
java.util.Set<Index<?,E,java.lang.Long>> |
getUserIndices()
|
java.io.File |
getWorkingDirectory()
|
boolean |
hasIndexOn(java.lang.String id)
Tells if an index is already present in the User's or System's index list |
boolean |
hasSystemIndexOn(java.lang.String id)
Tells if an index is already present in the System's index list |
boolean |
hasUserIndexOn(java.lang.String id)
Tells if an index is already present in the User's index list |
void |
init(org.apache.directory.shared.ldap.schema.SchemaManager schemaManager)
Initialize the JDBM storage system. |
boolean |
isInitialized()
Gets whether the store is initialized. |
boolean |
isSyncOnWrite()
|
IndexCursor<java.lang.Long,E,java.lang.Long> |
list(java.lang.Long id)
Gets an IndexEntry Cursor over the child nodes of an entry. |
org.apache.directory.shared.ldap.entry.ServerEntry |
lookup(java.lang.Long id)
|
void |
modify(org.apache.directory.shared.ldap.name.DN dn,
java.util.List<org.apache.directory.shared.ldap.entry.Modification> mods)
|
void |
modify(org.apache.directory.shared.ldap.name.DN dn,
org.apache.directory.shared.ldap.entry.ModificationOperation modOp,
org.apache.directory.shared.ldap.entry.ServerEntry mods)
|
void |
move(org.apache.directory.shared.ldap.name.DN oldChildDn,
org.apache.directory.shared.ldap.name.DN newParentDn)
|
void |
move(org.apache.directory.shared.ldap.name.DN oldChildDn,
org.apache.directory.shared.ldap.name.DN newParentDn,
org.apache.directory.shared.ldap.name.RDN newRdn,
boolean deleteOldRdn)
|
void |
rename(org.apache.directory.shared.ldap.name.DN dn,
org.apache.directory.shared.ldap.name.RDN newRdn,
boolean deleteOldRdn)
Changes the relative distinguished name of an entry specified by a distinguished name with the optional removal of the old RDN attribute value from the entry. |
void |
setAliasIndex(Index<java.lang.String,E,java.lang.Long> index)
Set the Alias index |
void |
setCacheSize(int cacheSize)
Sets the cache size for this store |
void |
setEntryCsnIndex(Index<java.lang.String,E,java.lang.Long> index)
Set the EntryCSN index |
void |
setEntryUuidIndex(Index<java.lang.String,E,java.lang.Long> index)
Set the EntryUUID index |
void |
setName(java.lang.String name)
Sets the store's name |
void |
setNdnIndex(Index<java.lang.String,E,java.lang.Long> index)
Set the NDN index |
void |
setObjectClassIndex(Index<java.lang.String,E,java.lang.Long> index)
Set the ObjectClass index |
void |
setOneAliasIndex(Index<java.lang.Long,E,java.lang.Long> index)
Set the OneAlias index |
void |
setOneLevelIndex(Index<java.lang.Long,E,java.lang.Long> index)
Set the OneLevel index |
void |
setPresenceIndex(Index<java.lang.String,E,java.lang.Long> index)
Set the Presence index |
void |
setProperty(java.lang.String propertyName,
java.lang.String propertyValue)
|
void |
setSchemaManager(org.apache.directory.shared.ldap.schema.SchemaManager schemaManager)
|
void |
setSubAliasIndex(Index<java.lang.Long,E,java.lang.Long> index)
Set the SubAlias index |
void |
setSubLevelIndex(Index<java.lang.Long,E,java.lang.Long> index)
Set the SubLevel index |
void |
setSuffixDn(java.lang.String suffixDn)
|
void |
setSyncOnWrite(boolean isSyncOnWrite)
Sets the flag telling the server to flush on disk when some modification has been done. |
void |
setUpdnIndex(Index<java.lang.String,E,java.lang.Long> index)
Set the UpDn index |
void |
setUserIndices(java.util.Set<Index<?,E,java.lang.Long>> userIndices)
Stores the list of user index |
void |
setWorkingDirectory(java.io.File workingDirectory)
Sets the working directory for the store |
void |
sync()
This method is called when the synch thread is waking up, to write the modified data. |
java.util.Iterator<java.lang.String> |
systemIndices()
An iterator build on top of the System's index |
java.util.Iterator<java.lang.String> |
userIndices()
An iterator build on top of the User's index |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JdbmStore()
Method Detail |
---|
public void setWorkingDirectory(java.io.File workingDirectory)
Store
setWorkingDirectory
in interface Store<E,java.lang.Long>
public java.io.File getWorkingDirectory()
getWorkingDirectory
in interface Store<E,java.lang.Long>
public void setSuffixDn(java.lang.String suffixDn)
setSuffixDn
in interface Store<E,java.lang.Long>
public java.lang.String getSuffixDn()
getSuffixDn
in interface Store<E,java.lang.Long>
public void setSyncOnWrite(boolean isSyncOnWrite)
Store
setSyncOnWrite
in interface Store<E,java.lang.Long>
isSyncOnWrite
- A boolean set to true if we have to flush on disk
when a modification occurspublic boolean isSyncOnWrite()
isSyncOnWrite
in interface Store<E,java.lang.Long>
true
if we write to disk for every modificationpublic void setCacheSize(int cacheSize)
Store
setCacheSize
in interface Store<E,java.lang.Long>
cacheSize
- The cache sizepublic int getCacheSize()
getCacheSize
in interface Store<E,java.lang.Long>
public void setName(java.lang.String name)
Store
setName
in interface Store<E,java.lang.Long>
name
- The store's namepublic java.lang.String getName()
getName
in interface Store<E,java.lang.Long>
public java.lang.Long getDefaultId()
Store
getDefaultId
in interface Store<E,java.lang.Long>
public void init(org.apache.directory.shared.ldap.schema.SchemaManager schemaManager) throws java.lang.Exception
init
in interface Store<E,java.lang.Long>
schemaManager
- the schema manager
java.lang.Exception
- on failure to lookup elements in schemaManager or create database filespublic void destroy() throws java.lang.Exception
destroy
in interface Store<E,java.lang.Long>
java.lang.Exception
- lazily thrown on any closer failures to avoid leaving
open filespublic boolean isInitialized()
isInitialized
in interface Store<E,java.lang.Long>
public void sync() throws java.lang.Exception
sync
in interface Store<E,java.lang.Long>
java.lang.Exception
- on failures to sync database files to diskpublic void setUserIndices(java.util.Set<Index<?,E,java.lang.Long>> userIndices)
Store
setUserIndices
in interface Store<E,java.lang.Long>
userIndices
- The list of user indexpublic java.util.Set<Index<?,E,java.lang.Long>> getUserIndices()
getUserIndices
in interface Store<E,java.lang.Long>
public void addIndex(Index<?,E,java.lang.Long> index) throws java.lang.Exception
Store
addIndex
in interface Store<E,java.lang.Long>
index
- The index to add
java.lang.Exception
- If the addition failedpublic Index<java.lang.String,E,java.lang.Long> getPresenceIndex()
getPresenceIndex
in interface Store<E,java.lang.Long>
public void setPresenceIndex(Index<java.lang.String,E,java.lang.Long> index) throws java.lang.Exception
setPresenceIndex
in interface Store<E,java.lang.Long>
index
- The Presence index
java.lang.Exception
- If the addition failedpublic Index<java.lang.Long,E,java.lang.Long> getOneLevelIndex()
getOneLevelIndex
in interface Store<E,java.lang.Long>
public void setOneLevelIndex(Index<java.lang.Long,E,java.lang.Long> index) throws java.lang.Exception
setOneLevelIndex
in interface Store<E,java.lang.Long>
index
- The OneLevel index
java.lang.Exception
- If the addition failedpublic Index<java.lang.String,E,java.lang.Long> getAliasIndex()
getAliasIndex
in interface Store<E,java.lang.Long>
public void setAliasIndex(Index<java.lang.String,E,java.lang.Long> index) throws org.apache.directory.shared.ldap.exception.LdapException
setAliasIndex
in interface Store<E,java.lang.Long>
index
- The Alias index
org.apache.directory.shared.ldap.exception.LdapException
public Index<java.lang.Long,E,java.lang.Long> getOneAliasIndex()
getOneAliasIndex
in interface Store<E,java.lang.Long>
public void setOneAliasIndex(Index<java.lang.Long,E,java.lang.Long> index) throws org.apache.directory.shared.ldap.exception.LdapException
setOneAliasIndex
in interface Store<E,java.lang.Long>
index
- The OneAlias index
org.apache.directory.shared.ldap.exception.LdapException
public Index<java.lang.Long,E,java.lang.Long> getSubAliasIndex()
getSubAliasIndex
in interface Store<E,java.lang.Long>
public void setSubAliasIndex(Index<java.lang.Long,E,java.lang.Long> index) throws org.apache.directory.shared.ldap.exception.LdapException
setSubAliasIndex
in interface Store<E,java.lang.Long>
index
- The SubAlias index
org.apache.directory.shared.ldap.exception.LdapException
public Index<java.lang.String,E,java.lang.Long> getUpdnIndex()
getUpdnIndex
in interface Store<E,java.lang.Long>
public void setUpdnIndex(Index<java.lang.String,E,java.lang.Long> index) throws org.apache.directory.shared.ldap.exception.LdapException
setUpdnIndex
in interface Store<E,java.lang.Long>
index
- The UpDn index
org.apache.directory.shared.ldap.exception.LdapException
public Index<java.lang.String,E,java.lang.Long> getNdnIndex()
getNdnIndex
in interface Store<E,java.lang.Long>
public void setNdnIndex(Index<java.lang.String,E,java.lang.Long> index) throws org.apache.directory.shared.ldap.exception.LdapException
setNdnIndex
in interface Store<E,java.lang.Long>
index
- The NDN index
org.apache.directory.shared.ldap.exception.LdapException
public Index<java.lang.Long,E,java.lang.Long> getSubLevelIndex()
getSubLevelIndex
in interface Store<E,java.lang.Long>
public void setSubLevelIndex(Index<java.lang.Long,E,java.lang.Long> index) throws org.apache.directory.shared.ldap.exception.LdapException
setSubLevelIndex
in interface Store<E,java.lang.Long>
index
- The SubLevel index
org.apache.directory.shared.ldap.exception.LdapException
public Index<java.lang.String,E,java.lang.Long> getObjectClassIndex()
getObjectClassIndex
in interface Store<E,java.lang.Long>
public void setObjectClassIndex(Index<java.lang.String,E,java.lang.Long> index) throws org.apache.directory.shared.ldap.exception.LdapException
setObjectClassIndex
in interface Store<E,java.lang.Long>
index
- The ObjectClass index
org.apache.directory.shared.ldap.exception.LdapException
public Index<java.lang.String,E,java.lang.Long> getEntryUuidIndex()
getEntryUuidIndex
in interface Store<E,java.lang.Long>
public void setEntryUuidIndex(Index<java.lang.String,E,java.lang.Long> index) throws org.apache.directory.shared.ldap.exception.LdapException
setEntryUuidIndex
in interface Store<E,java.lang.Long>
index
- The EntryUUID index
org.apache.directory.shared.ldap.exception.LdapException
public Index<java.lang.String,E,java.lang.Long> getEntryCsnIndex()
getEntryCsnIndex
in interface Store<E,java.lang.Long>
public void setEntryCsnIndex(Index<java.lang.String,E,java.lang.Long> index) throws org.apache.directory.shared.ldap.exception.LdapException
setEntryCsnIndex
in interface Store<E,java.lang.Long>
index
- The EntryCSN index
org.apache.directory.shared.ldap.exception.LdapException
public java.util.Iterator<java.lang.String> userIndices()
Store
userIndices
in interface Store<E,java.lang.Long>
public java.util.Iterator<java.lang.String> systemIndices()
Store
systemIndices
in interface Store<E,java.lang.Long>
public boolean hasIndexOn(java.lang.String id) throws org.apache.directory.shared.ldap.exception.LdapException
Store
hasIndexOn
in interface Store<E,java.lang.Long>
id
- The index we are looking for
true
if the index is already present in the
User's or System's index list
org.apache.directory.shared.ldap.exception.LdapException
public boolean hasUserIndexOn(java.lang.String id) throws org.apache.directory.shared.ldap.exception.LdapException
Store
hasUserIndexOn
in interface Store<E,java.lang.Long>
id
- The index we are looking for
true
if the index is already present in the
User's index list
org.apache.directory.shared.ldap.exception.LdapException
public boolean hasSystemIndexOn(java.lang.String id) throws org.apache.directory.shared.ldap.exception.LdapException
Store
hasSystemIndexOn
in interface Store<E,java.lang.Long>
id
- The index we are looking for
true
if the index is already present in the
System's index list
org.apache.directory.shared.ldap.exception.LdapException
public Index<?,E,java.lang.Long> getIndex(java.lang.String id) throws IndexNotFoundException
Store
getIndex
in interface Store<E,java.lang.Long>
id
- The index name we are looking for
IndexNotFoundException
- If the index does not existpublic Index<?,E,java.lang.Long> getUserIndex(java.lang.String id) throws IndexNotFoundException
Store
getUserIndex
in interface Store<E,java.lang.Long>
id
- The index name we are looking for
IndexNotFoundException
- If the index does not existpublic Index<?,E,java.lang.Long> getSystemIndex(java.lang.String id) throws IndexNotFoundException
Store
getSystemIndex
in interface Store<E,java.lang.Long>
id
- The index name we are looking for
IndexNotFoundException
- If the index does not existpublic java.lang.Long getEntryId(java.lang.String dn) throws java.lang.Exception
getEntryId
in interface Store<E,java.lang.Long>
java.lang.Exception
public java.lang.String getEntryDn(java.lang.Long id) throws java.lang.Exception
getEntryDn
in interface Store<E,java.lang.Long>
java.lang.Exception
public java.lang.Long getParentId(java.lang.String dn) throws java.lang.Exception
getParentId
in interface Store<E,java.lang.Long>
dn
- the normalized distinguished name of the child
java.lang.Exception
- on failures to access the underlying storepublic java.lang.Long getParentId(java.lang.Long childId) throws java.lang.Exception
getParentId
in interface Store<E,java.lang.Long>
java.lang.Exception
public java.lang.String getEntryUpdn(java.lang.Long id) throws java.lang.Exception
getEntryUpdn
in interface Store<E,java.lang.Long>
java.lang.Exception
public java.lang.String getEntryUpdn(java.lang.String dn) throws java.lang.Exception
getEntryUpdn
in interface Store<E,java.lang.Long>
java.lang.Exception
public int count() throws java.lang.Exception
count
in interface Store<E,java.lang.Long>
java.lang.Exception
public void add(org.apache.directory.shared.ldap.entry.ServerEntry entry) throws java.lang.Exception
add
in interface Store<E,java.lang.Long>
entry
- The entry to add
java.lang.Exception
- If the addition failed.public org.apache.directory.shared.ldap.entry.ServerEntry lookup(java.lang.Long id) throws java.lang.Exception
lookup
in interface Store<E,java.lang.Long>
java.lang.Exception
public void delete(java.lang.Long id) throws java.lang.Exception
delete
in interface Store<E,java.lang.Long>
id
- The id of the entry to delete
java.lang.Exception
- If the deletion failedpublic IndexCursor<java.lang.Long,E,java.lang.Long> list(java.lang.Long id) throws java.lang.Exception
list
in interface Store<E,java.lang.Long>
id
- the id of the parent entry
java.lang.Exception
- on failures to access the underlying storepublic int getChildCount(java.lang.Long id) throws java.lang.Exception
getChildCount
in interface Store<E,java.lang.Long>
java.lang.Exception
public org.apache.directory.shared.ldap.name.DN getSuffix()
getSuffix
in interface Store<E,java.lang.Long>
public org.apache.directory.shared.ldap.name.DN getUpSuffix()
getUpSuffix
in interface Store<E,java.lang.Long>
public void setProperty(java.lang.String propertyName, java.lang.String propertyValue) throws java.lang.Exception
setProperty
in interface Store<E,java.lang.Long>
java.lang.Exception
public java.lang.String getProperty(java.lang.String propertyName) throws java.lang.Exception
getProperty
in interface Store<E,java.lang.Long>
java.lang.Exception
public void modify(org.apache.directory.shared.ldap.name.DN dn, org.apache.directory.shared.ldap.entry.ModificationOperation modOp, org.apache.directory.shared.ldap.entry.ServerEntry mods) throws java.lang.Exception
modify
in interface Store<E,java.lang.Long>
java.lang.Exception
public void modify(org.apache.directory.shared.ldap.name.DN dn, java.util.List<org.apache.directory.shared.ldap.entry.Modification> mods) throws java.lang.Exception
modify
in interface Store<E,java.lang.Long>
java.lang.Exception
public void rename(org.apache.directory.shared.ldap.name.DN dn, org.apache.directory.shared.ldap.name.RDN newRdn, boolean deleteOldRdn) throws java.lang.Exception
rename
in interface Store<E,java.lang.Long>
dn
- the normalized distinguished name of the entry to alternewRdn
- the new RDN to setdeleteOldRdn
- whether or not to remove the old RDN attr/val
java.lang.Exception
- if there are any errors propagating the name changespublic void move(org.apache.directory.shared.ldap.name.DN oldChildDn, org.apache.directory.shared.ldap.name.DN newParentDn, org.apache.directory.shared.ldap.name.RDN newRdn, boolean deleteOldRdn) throws java.lang.Exception
move
in interface Store<E,java.lang.Long>
java.lang.Exception
public void move(org.apache.directory.shared.ldap.name.DN oldChildDn, org.apache.directory.shared.ldap.name.DN newParentDn) throws java.lang.Exception
move
in interface Store<E,java.lang.Long>
java.lang.Exception
public void setSchemaManager(org.apache.directory.shared.ldap.schema.SchemaManager schemaManager)
schemaManager
- the schemaManager to set
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |