|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Store<E,ID>
Represents an entry store based on the Table, Index, and MasterTable database structure.
Method Summary | |
---|---|
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<java.lang.String,E,ID> |
getAliasIndex()
|
int |
getCacheSize()
|
int |
getChildCount(ID id)
|
ID |
getDefaultId()
Gets the default ID. |
Index<java.lang.String,E,ID> |
getEntryCsnIndex()
|
java.lang.String |
getEntryDn(ID id)
|
ID |
getEntryId(java.lang.String dn)
|
java.lang.String |
getEntryUpdn(ID id)
|
java.lang.String |
getEntryUpdn(java.lang.String dn)
|
Index<java.lang.String,E,ID> |
getEntryUuidIndex()
|
Index<?,E,ID> |
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,ID> |
getNdnIndex()
|
Index<java.lang.String,E,ID> |
getObjectClassIndex()
|
Index<ID,E,ID> |
getOneAliasIndex()
|
Index<ID,E,ID> |
getOneLevelIndex()
|
ID |
getParentId(ID childId)
|
ID |
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,ID> |
getPresenceIndex()
|
java.lang.String |
getProperty(java.lang.String propertyName)
|
Index<ID,E,ID> |
getSubAliasIndex()
|
Index<ID,E,ID> |
getSubLevelIndex()
|
org.apache.directory.shared.ldap.name.DN |
getSuffix()
|
java.lang.String |
getSuffixDn()
|
Index<?,E,ID> |
getSystemIndex(java.lang.String id)
Get the system index associated with the given name |
Index<java.lang.String,E,ID> |
getUpdnIndex()
|
org.apache.directory.shared.ldap.name.DN |
getUpSuffix()
|
Index<?,E,ID> |
getUserIndex(java.lang.String id)
Get the user index associated with the given name |
java.util.Set<Index<?,E,ID>> |
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<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,
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,ID> index)
Set the Alias index |
void |
setCacheSize(int cacheSize)
Sets the cache size for this store |
void |
setEntryCsnIndex(Index<java.lang.String,E,ID> index)
Set the EntryCSN index |
void |
setEntryUuidIndex(Index<java.lang.String,E,ID> index)
Set the EntryUUID index |
void |
setName(java.lang.String name)
Sets the store's name |
void |
setNdnIndex(Index<java.lang.String,E,ID> index)
Set the NDN index |
void |
setObjectClassIndex(Index<java.lang.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<java.lang.String,E,ID> index)
Set the Presence index |
void |
setProperty(java.lang.String propertyName,
java.lang.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(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,ID> index)
Set the UpDn index |
void |
setUserIndices(java.util.Set<Index<?,E,ID>> 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 |
Method Detail |
---|
void setWorkingDirectory(java.io.File workingDirectory)
java.io.File getWorkingDirectory()
void setUserIndices(java.util.Set<Index<?,E,ID>> userIndices)
userIndices
- The list of user indexjava.util.Set<Index<?,E,ID>> getUserIndices()
void setSuffixDn(java.lang.String suffixDn)
java.lang.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(java.lang.String name)
name
- The store's namejava.lang.String getName()
void init(org.apache.directory.shared.ldap.schema.SchemaManager schemaManager) throws java.lang.Exception
schemaManager
- the schema schemaManager
java.lang.Exception
- on failure to lookup elements in schemaManager
java.lang.Exception
- on failure to create database filesvoid destroy() throws java.lang.Exception
java.lang.Exception
- lazily thrown on any closer failures to avoid leaving
open filesboolean isInitialized()
void sync() throws java.lang.Exception
java.lang.Exception
- on failures to sync database files to diskvoid addIndex(Index<?,E,ID> index) throws java.lang.Exception
index
- The index to add
java.lang.Exception
- If the addition failedIndex<java.lang.String,E,ID> getPresenceIndex()
void setPresenceIndex(Index<java.lang.String,E,ID> index) throws java.lang.Exception
index
- The Presence index
java.lang.Exception
- If the addition failedIndex<ID,E,ID> getOneLevelIndex()
void setOneLevelIndex(Index<ID,E,ID> index) throws java.lang.Exception
index
- The OneLevel index
java.lang.Exception
- If the addition failedIndex<ID,E,ID> getSubLevelIndex()
void setSubLevelIndex(Index<ID,E,ID> index) throws java.lang.Exception
index
- The SubLevel index
java.lang.Exception
- If the addition failedIndex<java.lang.String,E,ID> getAliasIndex()
void setAliasIndex(Index<java.lang.String,E,ID> index) throws java.lang.Exception
index
- The Alias index
java.lang.Exception
- If the addition failedIndex<ID,E,ID> getOneAliasIndex()
void setOneAliasIndex(Index<ID,E,ID> index) throws java.lang.Exception
index
- The OneAlias index
java.lang.Exception
- If the addition failedIndex<ID,E,ID> getSubAliasIndex()
void setSubAliasIndex(Index<ID,E,ID> index) throws java.lang.Exception
index
- The SubAlias index
java.lang.Exception
- If the addition failedIndex<java.lang.String,E,ID> getUpdnIndex()
void setUpdnIndex(Index<java.lang.String,E,ID> index) throws java.lang.Exception
index
- The UpDn index
java.lang.Exception
- If the addition failedIndex<java.lang.String,E,ID> getNdnIndex()
void setNdnIndex(Index<java.lang.String,E,ID> index) throws java.lang.Exception
index
- The NDN index
java.lang.Exception
- If the addition failedIndex<java.lang.String,E,ID> getObjectClassIndex()
void setObjectClassIndex(Index<java.lang.String,E,ID> index) throws java.lang.Exception
index
- The ObjectClass index
java.lang.Exception
- If the addition failedIndex<java.lang.String,E,ID> getEntryUuidIndex()
void setEntryUuidIndex(Index<java.lang.String,E,ID> index) throws java.lang.Exception
index
- The EntryUUID index
java.lang.Exception
- If the addition failedIndex<java.lang.String,E,ID> getEntryCsnIndex()
void setEntryCsnIndex(Index<java.lang.String,E,ID> index) throws java.lang.Exception
index
- The EntryCSN index
java.lang.Exception
- If the addition failedjava.util.Iterator<java.lang.String> userIndices()
java.util.Iterator<java.lang.String> systemIndices()
boolean hasIndexOn(java.lang.String id) throws java.lang.Exception
id
- The index we are looking for
true
if the index is already present in the
User's or System's index list
java.lang.Exception
- If something went wrongboolean hasUserIndexOn(java.lang.String id) throws java.lang.Exception
id
- The index we are looking for
true
if the index is already present in the
User's index list
java.lang.Exception
- If something went wrongboolean hasSystemIndexOn(java.lang.String id) throws java.lang.Exception
id
- The index we are looking for
true
if the index is already present in the
System's index list
java.lang.Exception
- If something went wrongIndex<?,E,ID> getIndex(java.lang.String id) throws IndexNotFoundException
id
- The index name we are looking for
IndexNotFoundException
- If the index does not existIndex<?,E,ID> getUserIndex(java.lang.String id) throws IndexNotFoundException
id
- The index name we are looking for
IndexNotFoundException
- If the index does not existIndex<?,E,ID> getSystemIndex(java.lang.String id) throws IndexNotFoundException
id
- The index name we are looking for
IndexNotFoundException
- If the index does not existID getEntryId(java.lang.String dn) throws java.lang.Exception
java.lang.Exception
java.lang.String getEntryDn(ID id) throws java.lang.Exception
java.lang.Exception
ID getParentId(java.lang.String dn) throws java.lang.Exception
dn
- the normalized distinguished name of the child
java.lang.Exception
- on failures to access the underlying storeID getParentId(ID childId) throws java.lang.Exception
java.lang.Exception
java.lang.String getEntryUpdn(ID id) throws java.lang.Exception
java.lang.Exception
java.lang.String getEntryUpdn(java.lang.String dn) throws java.lang.Exception
java.lang.Exception
int count() throws java.lang.Exception
java.lang.Exception
void add(org.apache.directory.shared.ldap.entry.ServerEntry entry) throws java.lang.Exception
entry
- The entry to add
java.lang.Exception
- If the addition failed.org.apache.directory.shared.ldap.entry.ServerEntry lookup(ID id) throws java.lang.Exception
java.lang.Exception
void delete(ID id) throws java.lang.Exception
id
- The id of the entry to delete
java.lang.Exception
- If the deletion failedIndexCursor<ID,E,ID> list(ID id) throws java.lang.Exception
id
- the id of the parent entry
java.lang.Exception
- on failures to access the underlying storeint getChildCount(ID id) throws java.lang.Exception
java.lang.Exception
org.apache.directory.shared.ldap.name.DN getSuffix()
org.apache.directory.shared.ldap.name.DN getUpSuffix()
void setProperty(java.lang.String propertyName, java.lang.String propertyValue) throws java.lang.Exception
java.lang.Exception
java.lang.String getProperty(java.lang.String propertyName) throws java.lang.Exception
java.lang.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 java.lang.Exception
java.lang.Exception
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
java.lang.Exception
void rename(org.apache.directory.shared.ldap.name.DN dn, org.apache.directory.shared.ldap.name.RDN newRdn, boolean deleteOldRdn) throws java.lang.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/val
java.lang.Exception
- 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 java.lang.Exception
java.lang.Exception
void move(org.apache.directory.shared.ldap.name.DN oldChildDn, org.apache.directory.shared.ldap.name.DN newParentDn) throws java.lang.Exception
java.lang.Exception
ID getDefaultId() throws java.lang.Exception
java.lang.Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |