public interface Store<E,ID>
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,ID> index)
Adds a user index to the list of index for this store
|
int |
count() |
void |
delete(ID id)
Delete the entry associated with a given Id
|
void |
destroy()
Close the parttion : we have to close all the userIndices and the master table.
|
Index<String,E,ID> |
getAliasIndex() |
int |
getCacheSize() |
int |
getChildCount(ID id) |
ID |
getDefaultId()
Gets the default ID.
|
Index<String,E,ID> |
getEntryCsnIndex() |
String |
getEntryDn(ID id) |
ID |
getEntryId(String dn) |
String |
getEntryUpdn(ID id) |
String |
getEntryUpdn(String dn) |
Index<String,E,ID> |
getEntryUuidIndex() |
Index<?,E,ID> |
getIndex(String id)
Get the user or system index associated with the given name
|
String |
getName() |
Index<String,E,ID> |
getNdnIndex() |
Index<String,E,ID> |
getObjectClassIndex() |
Index<ID,E,ID> |
getOneAliasIndex() |
Index<ID,E,ID> |
getOneLevelIndex() |
ID |
getParentId(ID childId) |
ID |
getParentId(String dn)
Gets the Long id of an entry's parent using the child entry's
normalized dn.
|
Index<String,E,ID> |
getPresenceIndex() |
String |
getProperty(String propertyName) |
Index<ID,E,ID> |
getSubAliasIndex() |
Index<ID,E,ID> |
getSubLevelIndex() |
org.apache.directory.shared.ldap.name.DN |
getSuffix() |
String |
getSuffixDn() |
Index<?,E,ID> |
getSystemIndex(String id)
Get the system index associated with the given name
|
Index<String,E,ID> |
getUpdnIndex() |
org.apache.directory.shared.ldap.name.DN |
getUpSuffix() |
Index<?,E,ID> |
getUserIndex(String id)
Get the user index associated with the given name
|
Set<Index<?,E,ID>> |
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<ID,E,ID> |
list(ID id)
Gets an IndexEntry Cursor over the child nodes of an entry.
|
org.apache.directory.shared.ldap.entry.ServerEntry |
lookup(ID 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,ID> index)
Set the Alias index
|
void |
setCacheSize(int cacheSize)
Sets the cache size for this store
|
void |
setEntryCsnIndex(Index<String,E,ID> index)
Set the EntryCSN index
|
void |
setEntryUuidIndex(Index<String,E,ID> index)
Set the EntryUUID index
|
void |
setName(String name)
Sets the store's name
|
void |
setNdnIndex(Index<String,E,ID> index)
Set the NDN index
|
void |
setObjectClassIndex(Index<String,E,ID> index)
Set the ObjectClass index
|
void |
setOneAliasIndex(Index<ID,E,ID> index)
Set the OneAlias index
|
void |
setOneLevelIndex(Index<ID,E,ID> index)
Set the OneLevel index
|
void |
setPresenceIndex(Index<String,E,ID> index)
Set the Presence index
|
void |
setProperty(String propertyName,
String propertyValue) |
void |
setSubAliasIndex(Index<ID,E,ID> index)
Set the SubAlias index
|
void |
setSubLevelIndex(Index<ID,E,ID> 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,ID> index)
Set the UpDn index
|
void |
setUserIndices(Set<Index<?,E,ID>> 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
|
void setWorkingDirectory(File workingDirectory)
File getWorkingDirectory()
void setUserIndices(Set<Index<?,E,ID>> userIndices)
userIndices
- The list of user indexvoid setSuffixDn(String suffixDn)
String getSuffixDn()
void setSyncOnWrite(boolean isSyncOnWrite)
isSyncOnWrite
- A boolean set to true if we have to flush on disk
when a modification occursboolean isSyncOnWrite()
true
if we write to disk for every modificationvoid setCacheSize(int cacheSize)
cacheSize
- The cache sizeint getCacheSize()
void setName(String name)
name
- The store's nameString getName()
void init(org.apache.directory.shared.ldap.schema.SchemaManager schemaManager) throws Exception
void destroy() throws Exception
Exception
- lazily thrown on any closer failures to avoid leaving
open filesboolean isInitialized()
void sync() throws Exception
Exception
- on failures to sync database files to diskvoid addIndex(Index<?,E,ID> index) throws Exception
index
- The index to addException
- If the addition failedvoid setPresenceIndex(Index<String,E,ID> index) throws Exception
index
- The Presence indexException
- If the addition failedvoid setOneLevelIndex(Index<ID,E,ID> index) throws Exception
index
- The OneLevel indexException
- If the addition failedvoid setSubLevelIndex(Index<ID,E,ID> index) throws Exception
index
- The SubLevel indexException
- If the addition failedvoid setAliasIndex(Index<String,E,ID> index) throws Exception
index
- The Alias indexException
- If the addition failedvoid setOneAliasIndex(Index<ID,E,ID> index) throws Exception
index
- The OneAlias indexException
- If the addition failedvoid setSubAliasIndex(Index<ID,E,ID> index) throws Exception
index
- The SubAlias indexException
- If the addition failedvoid setUpdnIndex(Index<String,E,ID> index) throws Exception
index
- The UpDn indexException
- If the addition failedvoid setNdnIndex(Index<String,E,ID> index) throws Exception
index
- The NDN indexException
- If the addition failedvoid setObjectClassIndex(Index<String,E,ID> index) throws Exception
index
- The ObjectClass indexException
- If the addition failedvoid setEntryUuidIndex(Index<String,E,ID> index) throws Exception
index
- The EntryUUID indexException
- If the addition failedvoid setEntryCsnIndex(Index<String,E,ID> index) throws Exception
index
- The EntryCSN indexException
- If the addition failedboolean hasIndexOn(String id) throws Exception
id
- The index we are looking fortrue
if the index is already present in the
User's or System's index listException
- If something went wrongboolean hasUserIndexOn(String id) throws Exception
id
- The index we are looking fortrue
if the index is already present in the
User's index listException
- If something went wrongboolean hasSystemIndexOn(String id) throws Exception
id
- The index we are looking fortrue
if the index is already present in the
System's index listException
- If something went wrongIndex<?,E,ID> getIndex(String id) throws IndexNotFoundException
id
- The index name we are looking forIndexNotFoundException
- If the index does not existIndex<?,E,ID> getUserIndex(String id) throws IndexNotFoundException
id
- The index name we are looking forIndexNotFoundException
- If the index does not existIndex<?,E,ID> getSystemIndex(String id) throws IndexNotFoundException
id
- The index name we are looking forIndexNotFoundException
- If the index does not existID getParentId(String dn) throws Exception
dn
- the normalized distinguished name of the childException
- on failures to access the underlying storevoid add(org.apache.directory.shared.ldap.entry.ServerEntry entry) throws Exception
entry
- The entry to addException
- If the addition failed.org.apache.directory.shared.ldap.entry.ServerEntry lookup(ID id) throws Exception
Exception
void delete(ID id) throws Exception
id
- The id of the entry to deleteException
- If the deletion failedIndexCursor<ID,E,ID> list(ID id) throws Exception
id
- the id of the parent entryException
- on failures to access the underlying storeorg.apache.directory.shared.ldap.name.DN getSuffix()
org.apache.directory.shared.ldap.name.DN getUpSuffix()
void setProperty(String propertyName, String propertyValue) throws Exception
Exception
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
Exception
void modify(org.apache.directory.shared.ldap.name.DN dn, List<org.apache.directory.shared.ldap.entry.Modification> mods) throws Exception
Exception
void rename(org.apache.directory.shared.ldap.name.DN dn, org.apache.directory.shared.ldap.name.RDN newRdn, boolean deleteOldRdn) throws Exception
dn
- the normalized distinguished name of the entry to alternewRdn
- the new RDN to setdeleteOldRdn
- whether or not to remove the old RDN attr/valException
- if there are any errors propagating the name changesvoid 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
Exception
void move(org.apache.directory.shared.ldap.name.DN oldChildDn, org.apache.directory.shared.ldap.name.DN newParentDn) throws Exception
Exception
Copyright © 2003–2015 The Apache Software Foundation. All rights reserved.