Constructor and Description |
---|
JdbmStore()
Creates a store based on JDBM B+Trees.
|
Modifier and Type | Method and Description |
---|---|
void |
add(org.apache.directory.shared.ldap.entry.ServerEntry entry)
Add an entry into the store.
|
void |
addIndex(Index<?,E,Long> index)
Adds a user index to the list of index for this store
|
int |
count() |
void |
delete(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<String,E,Long> |
getAliasIndex() |
int |
getCacheSize() |
int |
getChildCount(Long id) |
Long |
getDefaultId()
Gets the default ID.
|
Index<String,E,Long> |
getEntryCsnIndex() |
String |
getEntryDn(Long id) |
Long |
getEntryId(String dn) |
String |
getEntryUpdn(Long id) |
String |
getEntryUpdn(String dn) |
Index<String,E,Long> |
getEntryUuidIndex() |
Index<?,E,Long> |
getIndex(String id)
Get the user or system index associated with the given name
|
String |
getName() |
Index<String,E,Long> |
getNdnIndex() |
Index<String,E,Long> |
getObjectClassIndex() |
Index<Long,E,Long> |
getOneAliasIndex() |
Index<Long,E,Long> |
getOneLevelIndex() |
Long |
getParentId(Long childId) |
Long |
getParentId(String dn)
Gets the Long id of an entry's parent using the child entry's
normalized DN.
|
Index<String,E,Long> |
getPresenceIndex() |
String |
getProperty(String propertyName) |
Index<Long,E,Long> |
getSubAliasIndex() |
Index<Long,E,Long> |
getSubLevelIndex() |
org.apache.directory.shared.ldap.name.DN |
getSuffix() |
String |
getSuffixDn() |
Index<?,E,Long> |
getSystemIndex(String id)
Get the system index associated with the given name
|
Index<String,E,Long> |
getUpdnIndex() |
org.apache.directory.shared.ldap.name.DN |
getUpSuffix() |
Index<?,E,Long> |
getUserIndex(String id)
Get the user index associated with the given name
|
Set<Index<?,E,Long>> |
getUserIndices() |
File |
getWorkingDirectory() |
boolean |
hasIndexOn(String id)
Tells if an index is already present in the User's or System's index list
|
boolean |
hasSystemIndexOn(String id)
Tells if an index is already present in the System's index list
|
boolean |
hasUserIndexOn(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<Long,E,Long> |
list(Long id)
Gets an IndexEntry Cursor over the child nodes of an entry.
|
org.apache.directory.shared.ldap.entry.ServerEntry |
lookup(Long id) |
void |
modify(org.apache.directory.shared.ldap.name.DN dn,
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<String,E,Long> index)
Set the Alias index
|
void |
setCacheSize(int cacheSize)
Sets the cache size for this store
|
void |
setEntryCsnIndex(Index<String,E,Long> index)
Set the EntryCSN index
|
void |
setEntryUuidIndex(Index<String,E,Long> index)
Set the EntryUUID index
|
void |
setName(String name)
Sets the store's name
|
void |
setNdnIndex(Index<String,E,Long> index)
Set the NDN index
|
void |
setObjectClassIndex(Index<String,E,Long> index)
Set the ObjectClass index
|
void |
setOneAliasIndex(Index<Long,E,Long> index)
Set the OneAlias index
|
void |
setOneLevelIndex(Index<Long,E,Long> index)
Set the OneLevel index
|
void |
setPresenceIndex(Index<String,E,Long> index)
Set the Presence index
|
void |
setProperty(String propertyName,
String propertyValue) |
void |
setSchemaManager(org.apache.directory.shared.ldap.schema.SchemaManager schemaManager) |
void |
setSubAliasIndex(Index<Long,E,Long> index)
Set the SubAlias index
|
void |
setSubLevelIndex(Index<Long,E,Long> index)
Set the SubLevel index
|
void |
setSuffixDn(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<String,E,Long> index)
Set the UpDn index
|
void |
setUserIndices(Set<Index<?,E,Long>> userIndices)
Stores the list of user index
|
void |
setWorkingDirectory(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.
|
Iterator<String> |
systemIndices()
An iterator build on top of the System's index
|
Iterator<String> |
userIndices()
An iterator build on top of the User's index
|
public void setWorkingDirectory(File workingDirectory)
Store
setWorkingDirectory
in interface Store<E,Long>
public File getWorkingDirectory()
getWorkingDirectory
in interface Store<E,Long>
public void setSuffixDn(String suffixDn)
setSuffixDn
in interface Store<E,Long>
public String getSuffixDn()
getSuffixDn
in interface Store<E,Long>
public void setSyncOnWrite(boolean isSyncOnWrite)
Store
setSyncOnWrite
in interface Store<E,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,Long>
true
if we write to disk for every modificationpublic void setCacheSize(int cacheSize)
Store
setCacheSize
in interface Store<E,Long>
cacheSize
- The cache sizepublic int getCacheSize()
getCacheSize
in interface Store<E,Long>
public void setName(String name)
Store
public String getName()
public Long getDefaultId()
Store
getDefaultId
in interface Store<E,Long>
public void init(org.apache.directory.shared.ldap.schema.SchemaManager schemaManager) throws Exception
public void destroy() throws Exception
public boolean isInitialized()
isInitialized
in interface Store<E,Long>
public void sync() throws Exception
public void setUserIndices(Set<Index<?,E,Long>> userIndices)
Store
setUserIndices
in interface Store<E,Long>
userIndices
- The list of user indexpublic Set<Index<?,E,Long>> getUserIndices()
getUserIndices
in interface Store<E,Long>
public void addIndex(Index<?,E,Long> index) throws Exception
Store
public Index<String,E,Long> getPresenceIndex()
getPresenceIndex
in interface Store<E,Long>
public void setPresenceIndex(Index<String,E,Long> index) throws Exception
setPresenceIndex
in interface Store<E,Long>
index
- The Presence indexException
- If the addition failedpublic Index<Long,E,Long> getOneLevelIndex()
getOneLevelIndex
in interface Store<E,Long>
public void setOneLevelIndex(Index<Long,E,Long> index) throws Exception
setOneLevelIndex
in interface Store<E,Long>
index
- The OneLevel indexException
- If the addition failedpublic Index<String,E,Long> getAliasIndex()
getAliasIndex
in interface Store<E,Long>
public void setAliasIndex(Index<String,E,Long> index) throws org.apache.directory.shared.ldap.exception.LdapException
setAliasIndex
in interface Store<E,Long>
index
- The Alias indexorg.apache.directory.shared.ldap.exception.LdapException
public Index<Long,E,Long> getOneAliasIndex()
getOneAliasIndex
in interface Store<E,Long>
public void setOneAliasIndex(Index<Long,E,Long> index) throws org.apache.directory.shared.ldap.exception.LdapException
setOneAliasIndex
in interface Store<E,Long>
index
- The OneAlias indexorg.apache.directory.shared.ldap.exception.LdapException
public Index<Long,E,Long> getSubAliasIndex()
getSubAliasIndex
in interface Store<E,Long>
public void setSubAliasIndex(Index<Long,E,Long> index) throws org.apache.directory.shared.ldap.exception.LdapException
setSubAliasIndex
in interface Store<E,Long>
index
- The SubAlias indexorg.apache.directory.shared.ldap.exception.LdapException
public Index<String,E,Long> getUpdnIndex()
getUpdnIndex
in interface Store<E,Long>
public void setUpdnIndex(Index<String,E,Long> index) throws org.apache.directory.shared.ldap.exception.LdapException
setUpdnIndex
in interface Store<E,Long>
index
- The UpDn indexorg.apache.directory.shared.ldap.exception.LdapException
public Index<String,E,Long> getNdnIndex()
getNdnIndex
in interface Store<E,Long>
public void setNdnIndex(Index<String,E,Long> index) throws org.apache.directory.shared.ldap.exception.LdapException
setNdnIndex
in interface Store<E,Long>
index
- The NDN indexorg.apache.directory.shared.ldap.exception.LdapException
public Index<Long,E,Long> getSubLevelIndex()
getSubLevelIndex
in interface Store<E,Long>
public void setSubLevelIndex(Index<Long,E,Long> index) throws org.apache.directory.shared.ldap.exception.LdapException
setSubLevelIndex
in interface Store<E,Long>
index
- The SubLevel indexorg.apache.directory.shared.ldap.exception.LdapException
public Index<String,E,Long> getObjectClassIndex()
getObjectClassIndex
in interface Store<E,Long>
public void setObjectClassIndex(Index<String,E,Long> index) throws org.apache.directory.shared.ldap.exception.LdapException
setObjectClassIndex
in interface Store<E,Long>
index
- The ObjectClass indexorg.apache.directory.shared.ldap.exception.LdapException
public Index<String,E,Long> getEntryUuidIndex()
getEntryUuidIndex
in interface Store<E,Long>
public void setEntryUuidIndex(Index<String,E,Long> index) throws org.apache.directory.shared.ldap.exception.LdapException
setEntryUuidIndex
in interface Store<E,Long>
index
- The EntryUUID indexorg.apache.directory.shared.ldap.exception.LdapException
public Index<String,E,Long> getEntryCsnIndex()
getEntryCsnIndex
in interface Store<E,Long>
public void setEntryCsnIndex(Index<String,E,Long> index) throws org.apache.directory.shared.ldap.exception.LdapException
setEntryCsnIndex
in interface Store<E,Long>
index
- The EntryCSN indexorg.apache.directory.shared.ldap.exception.LdapException
public Iterator<String> userIndices()
Store
userIndices
in interface Store<E,Long>
public Iterator<String> systemIndices()
Store
systemIndices
in interface Store<E,Long>
public boolean hasIndexOn(String id) throws org.apache.directory.shared.ldap.exception.LdapException
Store
hasIndexOn
in interface Store<E,Long>
id
- The index we are looking fortrue
if the index is already present in the
User's or System's index listorg.apache.directory.shared.ldap.exception.LdapException
public boolean hasUserIndexOn(String id) throws org.apache.directory.shared.ldap.exception.LdapException
Store
hasUserIndexOn
in interface Store<E,Long>
id
- The index we are looking fortrue
if the index is already present in the
User's index listorg.apache.directory.shared.ldap.exception.LdapException
public boolean hasSystemIndexOn(String id) throws org.apache.directory.shared.ldap.exception.LdapException
Store
hasSystemIndexOn
in interface Store<E,Long>
id
- The index we are looking fortrue
if the index is already present in the
System's index listorg.apache.directory.shared.ldap.exception.LdapException
public Index<?,E,Long> getIndex(String id) throws IndexNotFoundException
Store
getIndex
in interface Store<E,Long>
id
- The index name we are looking forIndexNotFoundException
- If the index does not existpublic Index<?,E,Long> getUserIndex(String id) throws IndexNotFoundException
Store
getUserIndex
in interface Store<E,Long>
id
- The index name we are looking forIndexNotFoundException
- If the index does not existpublic Index<?,E,Long> getSystemIndex(String id) throws IndexNotFoundException
Store
getSystemIndex
in interface Store<E,Long>
id
- The index name we are looking forIndexNotFoundException
- If the index does not existpublic Long getEntryId(String dn) throws Exception
getEntryId
in interface Store<E,Long>
Exception
public String getEntryDn(Long id) throws Exception
getEntryDn
in interface Store<E,Long>
Exception
public Long getParentId(String dn) throws Exception
getParentId
in interface Store<E,Long>
dn
- the normalized distinguished name of the childException
- on failures to access the underlying storepublic Long getParentId(Long childId) throws Exception
getParentId
in interface Store<E,Long>
Exception
public String getEntryUpdn(Long id) throws Exception
getEntryUpdn
in interface Store<E,Long>
Exception
public String getEntryUpdn(String dn) throws Exception
getEntryUpdn
in interface Store<E,Long>
Exception
public int count() throws Exception
public void add(org.apache.directory.shared.ldap.entry.ServerEntry entry) throws Exception
public IndexCursor<Long,E,Long> list(Long id) throws Exception
public int getChildCount(Long id) throws Exception
getChildCount
in interface Store<E,Long>
Exception
public org.apache.directory.shared.ldap.name.DN getSuffix()
public org.apache.directory.shared.ldap.name.DN getUpSuffix()
getUpSuffix
in interface Store<E,Long>
public void setProperty(String propertyName, String propertyValue) throws Exception
setProperty
in interface Store<E,Long>
Exception
public String getProperty(String propertyName) throws Exception
getProperty
in interface Store<E,Long>
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 Exception
public void modify(org.apache.directory.shared.ldap.name.DN dn, List<org.apache.directory.shared.ldap.entry.Modification> mods) throws Exception
public void rename(org.apache.directory.shared.ldap.name.DN dn, org.apache.directory.shared.ldap.name.RDN newRdn, boolean deleteOldRdn) throws Exception
public 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 Exception
public void move(org.apache.directory.shared.ldap.name.DN oldChildDn, org.apache.directory.shared.ldap.name.DN newParentDn) throws Exception
public void setSchemaManager(org.apache.directory.shared.ldap.schema.SchemaManager schemaManager)
schemaManager
- the schemaManager to setCopyright © 2003–2015 The Apache Software Foundation. All rights reserved.