|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Store<E,ID extends Comparable<ID>>
Represents an entry store based on the Table, Index, and MasterTable database structure.
| Field Summary | |
|---|---|
static String[] |
SYS_INDEX_OID_ARRAY
|
static Set<String> |
SYS_INDEX_OIDS
|
| Method Summary | |
|---|---|
void |
addIndex(Index<?,E,ID> index)
Adds a (system or user) index to the list of index for this store. |
int |
count()
Gets the total count of entries within this store. |
void |
delete(ID id)
Delete an entry from the store |
Index<String,E,ID> |
getAliasIndex()
|
int |
getCacheSize()
Gets the cache size for this store. |
int |
getChildCount(ID id)
Gets the count of immediate children of the given entry ID. |
ID |
getDefaultId()
Gets the default ID. |
Index<String,E,ID> |
getEntryCsnIndex()
|
org.apache.directory.shared.ldap.model.name.Dn |
getEntryDn(ID id)
Gets the Entry's Dn identified by the given id. |
ID |
getEntryId(org.apache.directory.shared.ldap.model.name.Dn dn)
Gets the entry's id. |
Index<String,E,ID> |
getEntryUuidIndex()
|
Index<?,E,ID> |
getIndex(org.apache.directory.shared.ldap.model.schema.AttributeType attributeType)
Get the user or system index associated with the given attributeType |
Index<String,E,ID> |
getObjectClassIndex()
|
Index<ID,E,ID> |
getOneAliasIndex()
|
Index<ID,E,ID> |
getOneLevelIndex()
|
ID |
getParentId(ID childId)
Gets the ID of an entry's parent using the child entry's ID. |
URI |
getPartitionPath()
Gets the partition path (working directory) for the store. |
Index<String,E,ID> |
getPresenceIndex()
|
Index<ParentIdAndRdn<ID>,E,ID> |
getRdnIndex()
|
ID |
getRootId()
Gets the root ID of this store implementation. |
Index<ID,E,ID> |
getSubAliasIndex()
|
Index<ID,E,ID> |
getSubLevelIndex()
|
Index<?,E,ID> |
getSystemIndex(org.apache.directory.shared.ldap.model.schema.AttributeType attributeType)
Get the system index associated with the given name |
Iterator<String> |
getSystemIndices()
An iterator build on top of the System's index |
Index<?,E,ID> |
getUserIndex(org.apache.directory.shared.ldap.model.schema.AttributeType attributeType)
Get the user index associated with the given name |
Iterator<String> |
getUserIndices()
An iterator build on top of the User's index |
boolean |
hasIndexOn(org.apache.directory.shared.ldap.model.schema.AttributeType attributeType)
Tells if an index is already present in the User's or System's index list |
boolean |
hasSystemIndexOn(org.apache.directory.shared.ldap.model.schema.AttributeType attributeType)
Tells if an index is already present in the System's index list |
boolean |
hasUserIndexOn(org.apache.directory.shared.ldap.model.schema.AttributeType attributeType)
Tells if an index is already present in the User's index list |
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.model.entry.Entry |
lookup(ID id)
Get back an entry knowing its ID |
org.apache.directory.shared.ldap.model.entry.Entry |
modify(org.apache.directory.shared.ldap.model.name.Dn dn,
org.apache.directory.shared.ldap.model.entry.Modification... mods)
Modify an entry applying the given list of modifications. |
void |
move(org.apache.directory.shared.ldap.model.name.Dn oldDn,
org.apache.directory.shared.ldap.model.name.Dn newSuperior,
org.apache.directory.shared.ldap.model.name.Dn newDn,
org.apache.directory.shared.ldap.model.entry.Entry entry)
Move an entry from one place to the other. |
void |
moveAndRename(org.apache.directory.shared.ldap.model.name.Dn oldChildDn,
org.apache.directory.shared.ldap.model.name.Dn newParentDn,
org.apache.directory.shared.ldap.model.name.Rdn newRdn,
org.apache.directory.shared.ldap.model.entry.Entry entry,
boolean deleteOldRdn)
|
void |
rename(org.apache.directory.shared.ldap.model.name.Dn dn,
org.apache.directory.shared.ldap.model.name.Rdn newRdn,
boolean deleteOldRdn,
org.apache.directory.shared.ldap.model.entry.Entry entry)
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 |
setCacheSize(int cacheSize)
Sets the cache size for this store. |
void |
setPartitionPath(URI partitionPath)
Sets the partition path (working directory) for the store. |
void |
setSyncOnWrite(boolean isSyncOnWrite)
Sets the flag telling the server to flush on disk when some modification has been done. |
| Field Detail |
|---|
static final String[] SYS_INDEX_OID_ARRAY
static final Set<String> SYS_INDEX_OIDS
| Method Detail |
|---|
void setPartitionPath(URI partitionPath)
partitionDir - the new partition pathURI getPartitionPath()
ID getRootId()
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 addIndex(Index<?,E,ID> index)
throws Exception
index - The index to add
Exception - If the addition failedIndex<String,E,ID> getPresenceIndex()
Index<ID,E,ID> getOneLevelIndex()
Index<ID,E,ID> getSubLevelIndex()
Index<String,E,ID> getAliasIndex()
Index<ID,E,ID> getOneAliasIndex()
Index<ID,E,ID> getSubAliasIndex()
Index<ParentIdAndRdn<ID>,E,ID> getRdnIndex()
Index<String,E,ID> getObjectClassIndex()
Index<String,E,ID> getEntryUuidIndex()
Index<String,E,ID> getEntryCsnIndex()
Iterator<String> getUserIndices()
Iterator<String> getSystemIndices()
boolean hasIndexOn(org.apache.directory.shared.ldap.model.schema.AttributeType attributeType)
throws Exception
id - The index we are looking for
true if the index is already present in the
User's or System's index list
Exception - If something went wrong
boolean hasUserIndexOn(org.apache.directory.shared.ldap.model.schema.AttributeType attributeType)
throws Exception
attributeType - The attributeType index we are looking for
true if the index is already present in the
User's index list
Exception - If something went wrong
boolean hasSystemIndexOn(org.apache.directory.shared.ldap.model.schema.AttributeType attributeType)
throws Exception
attributeType - The index we are looking for
true if the index is already present in the
System's index list
Exception - If something went wrong
Index<?,E,ID> getIndex(org.apache.directory.shared.ldap.model.schema.AttributeType attributeType)
throws IndexNotFoundException
attributeType - The index attributeType we are looking for
IndexNotFoundException - If the index does not exist
Index<?,E,ID> getUserIndex(org.apache.directory.shared.ldap.model.schema.AttributeType attributeType)
throws IndexNotFoundException
attributeType - The index name we are looking for
IndexNotFoundException - If the index does not exist
Index<?,E,ID> getSystemIndex(org.apache.directory.shared.ldap.model.schema.AttributeType attributeType)
throws IndexNotFoundException
attributeType - The index name we are looking for
IndexNotFoundException - If the index does not exist
ID getEntryId(org.apache.directory.shared.ldap.model.name.Dn dn)
throws Exception
null if the Dn doesn't exist in this store.
Note that the Dn must be normalized!
dn - the normalized entry Dn
null if the Dn doesn't exists
Exception
org.apache.directory.shared.ldap.model.name.Dn getEntryDn(ID id)
throws Exception
id - the entry's id
Exception
ID getParentId(ID childId)
throws Exception
childId - the ID of the entry
Exception - on failures to access the underlying store
int count()
throws Exception
Exception - on failures to access the underlying store
void delete(ID id)
throws Exception
id - The Entry ID we want to delete
Exception - If the deletion failed for any reason
IndexCursor<ID,E,ID> list(ID id)
throws Exception
id - the id of the parent entry
Exception - on failures to access the underlying store
org.apache.directory.shared.ldap.model.entry.Entry lookup(ID id)
throws Exception
id - The Entry ID we want to get back
Exception - If the lookup failed for any reason (except a not found entry)
int getChildCount(ID id)
throws Exception
id - the entry ID
Exception - on failures to access the underlying store
org.apache.directory.shared.ldap.model.entry.Entry modify(org.apache.directory.shared.ldap.model.name.Dn dn,
org.apache.directory.shared.ldap.model.entry.Modification... mods)
throws Exception
dn - The Entry's Dnmods - The list of modifications
Exception - If the modification failed
void rename(org.apache.directory.shared.ldap.model.name.Dn dn,
org.apache.directory.shared.ldap.model.name.Rdn newRdn,
boolean deleteOldRdn,
org.apache.directory.shared.ldap.model.entry.Entry entry)
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/valentry - the modified entry
Exception - if there are any errors propagating the name changes
void moveAndRename(org.apache.directory.shared.ldap.model.name.Dn oldChildDn,
org.apache.directory.shared.ldap.model.name.Dn newParentDn,
org.apache.directory.shared.ldap.model.name.Rdn newRdn,
org.apache.directory.shared.ldap.model.entry.Entry entry,
boolean deleteOldRdn)
throws Exception
Exception
void move(org.apache.directory.shared.ldap.model.name.Dn oldDn,
org.apache.directory.shared.ldap.model.name.Dn newSuperior,
org.apache.directory.shared.ldap.model.name.Dn newDn,
org.apache.directory.shared.ldap.model.entry.Entry entry)
throws Exception
Move an entry from one place to the other. The Rdn remains unchanged, the parent Dn changes
We have to update some of the index when moving an entry. Assuming that the target destination does not exist, the following index must be updated :
If the moved entry is an alias, then we also have to update the following index :
The Alias index is not updated, as the entry ID won't change.
We have a few check we must do before moving the entry :
oldDn - The previous entry DnnewSuperior - The new superior DnnewDn - The new Dnentry - The entry to move
Exception - If the move failed
ID getDefaultId()
throws Exception
Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||