|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Store<E>
Represents an entry store based on the Table, Index, and MasterTable database structure.
| Method Summary | |
|---|---|
void |
add(ServerEntry entry)
Add an entry into the store. |
void |
addIndex(Index<?,E> 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 parttion : we have to close all the userIndices and the master table. |
Index<java.lang.String,E> |
getAliasIndex()
|
int |
getCacheSize()
|
int |
getChildCount(java.lang.Long id)
|
Index<java.lang.String,E> |
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<byte[],E> |
getEntryUuidIndex()
|
java.lang.String |
getName()
|
Index<java.lang.String,E> |
getNdnIndex()
|
Index<java.lang.String,E> |
getObjectClassIndex()
|
Index<java.lang.Long,E> |
getOneAliasIndex()
|
Index<java.lang.Long,E> |
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> |
getPresenceIndex()
|
java.lang.String |
getProperty(java.lang.String propertyName)
|
Index<java.lang.Long,E> |
getSubAliasIndex()
|
Index<java.lang.Long,E> |
getSubLevelIndex()
|
org.apache.directory.shared.ldap.name.LdapDN |
getSuffix()
|
java.lang.String |
getSuffixDn()
|
Index<?,E> |
getSystemIndex(java.lang.String id)
Get the user index associated with the given name |
Index<java.lang.String,E> |
getUpdnIndex()
|
org.apache.directory.shared.ldap.name.LdapDN |
getUpSuffix()
|
Index<?,E> |
getUserIndex(java.lang.String id)
Get the user index associated with the given name |
java.util.Set<Index<?,E>> |
getUserIndices()
|
java.io.File |
getWorkingDirectory()
|
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(Registries registries)
Initialize the JDBM storage system. |
void |
initRegistries(Registries registries)
|
boolean |
isInitialized()
Gets whether the store is initialized. |
boolean |
isSyncOnWrite()
|
IndexCursor<java.lang.Long,E> |
list(java.lang.Long id)
Gets an IndexEntry Cursor over the child nodes of an entry. |
ServerEntry |
lookup(java.lang.Long id)
|
void |
modify(org.apache.directory.shared.ldap.name.LdapDN dn,
java.util.List<org.apache.directory.shared.ldap.entry.Modification> mods)
|
void |
modify(org.apache.directory.shared.ldap.name.LdapDN dn,
org.apache.directory.shared.ldap.entry.ModificationOperation modOp,
ServerEntry mods)
|
void |
move(org.apache.directory.shared.ldap.name.LdapDN oldChildDn,
org.apache.directory.shared.ldap.name.LdapDN newParentDn)
|
void |
move(org.apache.directory.shared.ldap.name.LdapDN oldChildDn,
org.apache.directory.shared.ldap.name.LdapDN newParentDn,
org.apache.directory.shared.ldap.name.Rdn newRdn,
boolean deleteOldRdn)
|
void |
rename(org.apache.directory.shared.ldap.name.LdapDN 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> index)
Set the Alias index |
void |
setCacheSize(int cacheSize)
Sets the cache size for this store |
void |
setEntryCsnIndex(Index<java.lang.String,E> index)
Set the EntryCSN index |
void |
setEntryUuidIndex(Index<byte[],E> index)
Set the EntryUUID index |
void |
setName(java.lang.String name)
Sets the store's name |
void |
setNdnIndex(Index<java.lang.String,E> index)
Set the NDN index |
void |
setObjectClassIndex(Index<java.lang.String,E> index)
Set the ObjectClass index |
void |
setOneAliasIndex(Index<java.lang.Long,E> index)
Set the OneAlias index |
void |
setOneLevelIndex(Index<java.lang.Long,E> index)
Set the OneLevel index |
void |
setPresenceIndex(Index<java.lang.String,E> index)
Set the Presence index |
void |
setProperty(java.lang.String propertyName,
java.lang.String propertyValue)
|
void |
setSubAliasIndex(Index<java.lang.Long,E> index)
Set the SubAlias index |
void |
setSubLevelIndex(Index<java.lang.Long,E> 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> index)
Set the UpDn index |
void |
setUserIndices(java.util.Set<Index<?,E>> 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>> userIndices)
userIndices - The list of user indexjava.util.Set<Index<?,E>> 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(Registries registries)
throws java.lang.Exception
registries - the schema registries
java.lang.Exception - on failure to lookup elements in registries
java.lang.Exception - on failure to create database files
void 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 disk
void addIndex(Index<?,E> index)
throws java.lang.Exception
index - The index to add
java.lang.Exception - If the addition failedIndex<java.lang.String,E> getPresenceIndex()
void setPresenceIndex(Index<java.lang.String,E> index)
throws java.lang.Exception
index - The Presence index
java.lang.Exception - If the addition failedIndex<java.lang.Long,E> getOneLevelIndex()
void setOneLevelIndex(Index<java.lang.Long,E> index)
throws java.lang.Exception
index - The OneLevel index
java.lang.Exception - If the addition failedIndex<java.lang.Long,E> getSubLevelIndex()
void setSubLevelIndex(Index<java.lang.Long,E> index)
throws java.lang.Exception
index - The SubLevel index
java.lang.Exception - If the addition failedIndex<java.lang.String,E> getAliasIndex()
void setAliasIndex(Index<java.lang.String,E> index)
throws java.lang.Exception
index - The Alias index
java.lang.Exception - If the addition failedIndex<java.lang.Long,E> getOneAliasIndex()
void setOneAliasIndex(Index<java.lang.Long,E> index)
throws java.lang.Exception
index - The OneAlias index
java.lang.Exception - If the addition failedIndex<java.lang.Long,E> getSubAliasIndex()
void setSubAliasIndex(Index<java.lang.Long,E> index)
throws java.lang.Exception
index - The SubAlias index
java.lang.Exception - If the addition failedIndex<java.lang.String,E> getUpdnIndex()
void setUpdnIndex(Index<java.lang.String,E> index)
throws java.lang.Exception
index - The UpDn index
java.lang.Exception - If the addition failedIndex<java.lang.String,E> getNdnIndex()
void setNdnIndex(Index<java.lang.String,E> index)
throws java.lang.Exception
index - The NDN index
java.lang.Exception - If the addition failedIndex<java.lang.String,E> getObjectClassIndex()
void setObjectClassIndex(Index<java.lang.String,E> index)
throws java.lang.Exception
index - The ObjectClass index
java.lang.Exception - If the addition failedIndex<byte[],E> getEntryUuidIndex()
void setEntryUuidIndex(Index<byte[],E> index)
throws java.lang.Exception
index - The EntryUUID index
java.lang.Exception - If the addition failedIndex<java.lang.String,E> getEntryCsnIndex()
void setEntryCsnIndex(Index<java.lang.String,E> 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 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 wrong
boolean 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 wrong
Index<?,E> getUserIndex(java.lang.String id)
throws IndexNotFoundException
id - The index name we are looking for
IndexNotFoundException - If the index does not exist
Index<?,E> getSystemIndex(java.lang.String id)
throws IndexNotFoundException
id - The index name we are looking for
IndexNotFoundException - If the index does not exist
java.lang.Long getEntryId(java.lang.String dn)
throws java.lang.Exception
java.lang.Exception
java.lang.String getEntryDn(java.lang.Long id)
throws java.lang.Exception
java.lang.Exception
java.lang.Long 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 store
java.lang.Long getParentId(java.lang.Long childId)
throws java.lang.Exception
java.lang.Exception
java.lang.String getEntryUpdn(java.lang.Long 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(ServerEntry entry)
throws java.lang.Exception
entry - The entry to add
java.lang.Exception - If the addition failed.
ServerEntry lookup(java.lang.Long id)
throws java.lang.Exception
java.lang.Exception
void delete(java.lang.Long id)
throws java.lang.Exception
id - The id of the entry to delete
java.lang.Exception - If the deletion failed
IndexCursor<java.lang.Long,E> list(java.lang.Long id)
throws java.lang.Exception
id - the id of the parent entry
java.lang.Exception - on failures to access the underlying store
int getChildCount(java.lang.Long id)
throws java.lang.Exception
java.lang.Exceptionorg.apache.directory.shared.ldap.name.LdapDN getSuffix()
org.apache.directory.shared.ldap.name.LdapDN 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.LdapDN dn,
org.apache.directory.shared.ldap.entry.ModificationOperation modOp,
ServerEntry mods)
throws java.lang.Exception
java.lang.Exception
void modify(org.apache.directory.shared.ldap.name.LdapDN 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.LdapDN 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 changes
void move(org.apache.directory.shared.ldap.name.LdapDN oldChildDn,
org.apache.directory.shared.ldap.name.LdapDN 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.LdapDN oldChildDn,
org.apache.directory.shared.ldap.name.LdapDN newParentDn)
throws java.lang.Exception
java.lang.Exceptionvoid initRegistries(Registries registries)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||