public class AvlStore<E> extends Object implements Store<E,Long>
| Constructor and Description |
|---|
AvlStore() |
| 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<? extends Object,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 parttion : we have to close all the userIndices and the master table.
|
Index<String,E,Long> |
getAliasIndex() |
int |
getCacheSize()
always returns 0 (zero), cause this is a inmemory store
|
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<? extends Object,E,Long> |
getUserIndex(String id)
Get the user index associated with the given name
|
Set<Index<? extends Object,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 |
modify(long entryId,
List<org.apache.directory.shared.ldap.entry.Modification> 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 size)
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 |
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 sync)
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<? extends Object,E,Long>> userIndices)
Stores the list of user index
|
void |
setWorkingDirectory(File wkDir)
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 add(org.apache.directory.shared.ldap.entry.ServerEntry entry)
throws Exception
public void addIndex(Index<? extends Object,E,Long> index) throws Exception
public int count()
throws Exception
public void destroy()
throws Exception
public Index<String,E,Long> getAliasIndex()
getAliasIndex in interface Store<E,Long>public int getChildCount(Long id) throws Exception
getChildCount in interface Store<E,Long>Exceptionpublic String getEntryDn(Long id) throws Exception
getEntryDn in interface Store<E,Long>Exceptionpublic Long getEntryId(String dn) throws Exception
getEntryId in interface Store<E,Long>Exceptionpublic String getEntryUpdn(Long id) throws Exception
getEntryUpdn in interface Store<E,Long>Exceptionpublic String getEntryUpdn(String dn) throws Exception
getEntryUpdn in interface Store<E,Long>Exceptionpublic String getName()
public Index<String,E,Long> getNdnIndex()
getNdnIndex in interface Store<E,Long>public Index<Long,E,Long> getOneAliasIndex()
getOneAliasIndex in interface Store<E,Long>public Index<Long,E,Long> getOneLevelIndex()
getOneLevelIndex in interface Store<E,Long>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>Exceptionpublic Index<String,E,Long> getPresenceIndex()
getPresenceIndex in interface Store<E,Long>public String getProperty(String propertyName) throws Exception
getProperty in interface Store<E,Long>Exceptionpublic Index<Long,E,Long> getSubAliasIndex()
getSubAliasIndex in interface Store<E,Long>public Index<Long,E,Long> getSubLevelIndex()
getSubLevelIndex in interface Store<E,Long>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 String getSuffixDn()
getSuffixDn in interface Store<E,Long>public Index<?,E,Long> getSystemIndex(String id) throws IndexNotFoundException
getSystemIndex in interface Store<E,Long>id - The index name we are looking forIndexNotFoundException - If the index does not existpublic Index<?,E,Long> getIndex(String id) throws IndexNotFoundException
getIndex in interface Store<E,Long>id - The index name we are looking forIndexNotFoundException - If the index does not existpublic Index<String,E,Long> getUpdnIndex()
getUpdnIndex in interface Store<E,Long>public Index<? extends Object,E,Long> getUserIndex(String id) throws IndexNotFoundException
getUserIndex in interface Store<E,Long>id - The index name we are looking forIndexNotFoundException - If the index does not existpublic Set<Index<? extends Object,E,Long>> getUserIndices()
getUserIndices in interface Store<E,Long>public boolean hasIndexOn(String id) throws Exception
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 listException - If something went wrongpublic boolean hasSystemIndexOn(String id) throws Exception
hasSystemIndexOn in interface Store<E,Long>id - The index we are looking fortrue if the index is already present in the
System's index listException - If something went wrongpublic boolean hasUserIndexOn(String id) throws Exception
hasUserIndexOn in interface Store<E,Long>id - The index we are looking fortrue if the index is already present in the
User's index listException - If something went wrongpublic void init(org.apache.directory.shared.ldap.schema.SchemaManager schemaManager)
throws Exception
public boolean isInitialized()
isInitialized in interface Store<E,Long>public IndexCursor<Long,E,Long> list(Long id) throws 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 modify(long entryId,
List<org.apache.directory.shared.ldap.entry.Modification> mods)
throws Exception
Exceptionpublic 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 rename(org.apache.directory.shared.ldap.name.DN dn,
org.apache.directory.shared.ldap.name.RDN newRdn,
boolean deleteOldRdn)
throws Exception
public void setAliasIndex(Index<String,E,Long> index) throws Exception
setAliasIndex in interface Store<E,Long>index - The Alias indexException - If the addition failedpublic void setName(String name)
public void setNdnIndex(Index<String,E,Long> index) throws Exception
setNdnIndex in interface Store<E,Long>index - The NDN indexException - If the addition failedpublic void setOneAliasIndex(Index<Long,E,Long> index) throws Exception
setOneAliasIndex in interface Store<E,Long>index - The OneAlias indexException - If the addition failedpublic void setOneLevelIndex(Index<Long,E,Long> index) throws Exception
setOneLevelIndex in interface Store<E,Long>index - The OneLevel indexException - If the addition failedpublic void setPresenceIndex(Index<String,E,Long> index) throws Exception
setPresenceIndex in interface Store<E,Long>index - The Presence indexException - If the addition failedpublic void setProperty(String propertyName, String propertyValue) throws Exception
setProperty in interface Store<E,Long>Exceptionpublic void setSubAliasIndex(Index<Long,E,Long> index) throws Exception
setSubAliasIndex in interface Store<E,Long>index - The SubAlias indexException - If the addition failedpublic void setSubLevelIndex(Index<Long,E,Long> index) throws Exception
setSubLevelIndex in interface Store<E,Long>index - The SubLevel indexException - If the addition failedpublic void setSuffixDn(String suffixDn)
setSuffixDn in interface Store<E,Long>public void setUpdnIndex(Index<String,E,Long> index) throws Exception
setUpdnIndex in interface Store<E,Long>index - The UpDn indexException - If the addition failedpublic void setUserIndices(Set<Index<? extends Object,E,Long>> userIndices)
setUserIndices in interface Store<E,Long>userIndices - The list of user indexpublic Iterator<String> systemIndices()
systemIndices in interface Store<E,Long>public Iterator<String> userIndices()
userIndices in interface Store<E,Long>public int getCacheSize()
getCacheSize in interface Store<E,Long>public Index<String,E,Long> getEntryCsnIndex()
getEntryCsnIndex in interface Store<E,Long>public Index<String,E,Long> getEntryUuidIndex()
getEntryUuidIndex in interface Store<E,Long>public Index<String,E,Long> getObjectClassIndex()
getObjectClassIndex in interface Store<E,Long>public void setEntryCsnIndex(Index<String,E,Long> index) throws Exception
StoresetEntryCsnIndex in interface Store<E,Long>index - The EntryCSN indexException - If the addition failedpublic void setSyncOnWrite(boolean sync)
StoresetSyncOnWrite in interface Store<E,Long>sync - A boolean set to true if we have to flush on disk
when a modification occurspublic void setWorkingDirectory(File wkDir)
StoresetWorkingDirectory in interface Store<E,Long>public File getWorkingDirectory()
getWorkingDirectory in interface Store<E,Long>public boolean isSyncOnWrite()
isSyncOnWrite in interface Store<E,Long>true if we write to disk for every modificationpublic void setCacheSize(int size)
StoresetCacheSize in interface Store<E,Long>size - The cache sizepublic void setObjectClassIndex(Index<String,E,Long> index)
StoresetObjectClassIndex in interface Store<E,Long>index - The ObjectClass indexpublic void setEntryUuidIndex(Index<String,E,Long> index)
StoresetEntryUuidIndex in interface Store<E,Long>index - The EntryUUID indexpublic void sync()
throws Exception
StoreCopyright © 2003-2012 Apache Software Foundation. All Rights Reserved.