org.apache.directory.server.xdbm
Interface Store<E>

All Known Implementing Classes:
JdbmStore

public interface Store<E>

Represents an entry store based on the Table, Index, and MasterTable database structure.

Version:
$$Rev$$
Author:
Apache Directory Project

Field Summary
static java.lang.String ALIAS
          Private OID (1.3.6.1.4.1.18060.0.4.1.2.7) for apacheAlias index
static java.lang.String NDN
          Private OID (1.3.6.1.4.1.18060.0.4.1.2.1) for apacheNdn op attrib
static java.lang.String ONEALIAS
          Private OID (1.3.6.1.4.1.18060.0.4.1.2.5) for apacheOneAlias index
static java.lang.String ONELEVEL
          Private OID (1.3.6.1.4.1.18060.0.4.1.2.4) for apacheOneLevel op attrib
static java.lang.String PRESENCE
          Private OID (1.3.6.1.4.1.18060.0.4.1.2.3) for apachePresence op attrib
static java.lang.String SUBALIAS
          Private OID (1.3.6.1.4.1.18060.0.4.1.2.6) for apacheSubAlias index
static java.lang.String SUBLEVEL
          Private OID (1.3.6.1.4.1.18060.0.4.1.2.43) for apacheSubLevel index
static java.lang.String UPDN
          Private OID (1.3.6.1.4.1.18060.0.4.1.2.2) for apacheUpdn op attrib
 
Method Summary
 void add(org.apache.directory.shared.ldap.name.LdapDN normName, ServerEntry entry)
           
 void addIndex(Index<?,E> index)
           
 int count()
           
 void delete(java.lang.Long 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)
           
 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)
           
 java.lang.String getName()
           
 Index<java.lang.String,E> getNdnIndex()
           
 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)
           
 Index<java.lang.String,E> getUpdnIndex()
           
 org.apache.directory.shared.ldap.name.LdapDN getUpSuffix()
           
 Index<?,E> getUserIndex(java.lang.String id)
           
 java.util.Set<Index<?,E>> getUserIndices()
           
 java.io.File getWorkingDirectory()
           
 boolean hasSystemIndexOn(java.lang.String id)
           
 boolean hasUserIndexOn(java.lang.String id)
           
 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)
           
 void setCacheSize(int cacheSize)
           
 void setName(java.lang.String name)
           
 void setNdnIndex(Index<java.lang.String,E> index)
           
 void setOneAliasIndex(Index<java.lang.Long,E> index)
           
 void setOneLevelIndex(Index<java.lang.Long,E> index)
           
 void setPresenceIndex(Index<java.lang.String,E> index)
           
 void setProperty(java.lang.String propertyName, java.lang.String propertyValue)
           
 void setSubAliasIndex(Index<java.lang.Long,E> index)
           
 void setSubLevelIndex(Index<java.lang.Long,E> index)
           
 void setSuffixDn(java.lang.String suffixDn)
           
 void setSyncOnWrite(boolean isSyncOnWrite)
           
 void setUpdnIndex(Index<java.lang.String,E> index)
           
 void setUserIndices(java.util.Set<Index<?,E>> userIndices)
           
 void setWorkingDirectory(java.io.File workingDirectory)
           
 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()
           
 java.util.Iterator<java.lang.String> userIndices()
           
 

Field Detail

NDN

static final java.lang.String NDN
Private OID (1.3.6.1.4.1.18060.0.4.1.2.1) for apacheNdn op attrib

See Also:
Constant Field Values

UPDN

static final java.lang.String UPDN
Private OID (1.3.6.1.4.1.18060.0.4.1.2.2) for apacheUpdn op attrib

See Also:
Constant Field Values

ONEALIAS

static final java.lang.String ONEALIAS
Private OID (1.3.6.1.4.1.18060.0.4.1.2.5) for apacheOneAlias index

See Also:
Constant Field Values

SUBALIAS

static final java.lang.String SUBALIAS
Private OID (1.3.6.1.4.1.18060.0.4.1.2.6) for apacheSubAlias index

See Also:
Constant Field Values

ALIAS

static final java.lang.String ALIAS
Private OID (1.3.6.1.4.1.18060.0.4.1.2.7) for apacheAlias index

See Also:
Constant Field Values

SUBLEVEL

static final java.lang.String SUBLEVEL
Private OID (1.3.6.1.4.1.18060.0.4.1.2.43) for apacheSubLevel index

See Also:
Constant Field Values

PRESENCE

static final java.lang.String PRESENCE
Private OID (1.3.6.1.4.1.18060.0.4.1.2.3) for apachePresence op attrib

See Also:
Constant Field Values

ONELEVEL

static final java.lang.String ONELEVEL
Private OID (1.3.6.1.4.1.18060.0.4.1.2.4) for apacheOneLevel op attrib

See Also:
Constant Field Values
Method Detail

setWorkingDirectory

void setWorkingDirectory(java.io.File workingDirectory)

getWorkingDirectory

java.io.File getWorkingDirectory()

setUserIndices

void setUserIndices(java.util.Set<Index<?,E>> userIndices)

getUserIndices

java.util.Set<Index<?,E>> getUserIndices()

setSuffixDn

void setSuffixDn(java.lang.String suffixDn)

getSuffixDn

java.lang.String getSuffixDn()

setSyncOnWrite

void setSyncOnWrite(boolean isSyncOnWrite)

isSyncOnWrite

boolean isSyncOnWrite()

setCacheSize

void setCacheSize(int cacheSize)

getCacheSize

int getCacheSize()

setName

void setName(java.lang.String name)

getName

java.lang.String getName()

init

void init(Registries registries)
          throws java.lang.Exception
Initialize the JDBM storage system.

Parameters:
registries - the schema registries
Throws:
java.lang.Exception - on failure to lookup elements in registries
java.lang.Exception - on failure to create database files

destroy

void destroy()
             throws java.lang.Exception
Close the parttion : we have to close all the userIndices and the master table.

Throws:
java.lang.Exception - lazily thrown on any closer failures to avoid leaving open files

isInitialized

boolean isInitialized()
Gets whether the store is initialized.

Returns:
true if the partition store is initialized

sync

void sync()
          throws java.lang.Exception
This method is called when the synch thread is waking up, to write the modified data.

Throws:
java.lang.Exception - on failures to sync database files to disk

addIndex

void addIndex(Index<?,E> index)
              throws java.lang.Exception
Throws:
java.lang.Exception

getPresenceIndex

Index<java.lang.String,E> getPresenceIndex()

setPresenceIndex

void setPresenceIndex(Index<java.lang.String,E> index)
                      throws java.lang.Exception
Throws:
java.lang.Exception

getOneLevelIndex

Index<java.lang.Long,E> getOneLevelIndex()

setOneLevelIndex

void setOneLevelIndex(Index<java.lang.Long,E> index)
                      throws java.lang.Exception
Throws:
java.lang.Exception

getSubLevelIndex

Index<java.lang.Long,E> getSubLevelIndex()

setSubLevelIndex

void setSubLevelIndex(Index<java.lang.Long,E> index)
                      throws java.lang.Exception
Throws:
java.lang.Exception

getAliasIndex

Index<java.lang.String,E> getAliasIndex()

setAliasIndex

void setAliasIndex(Index<java.lang.String,E> index)
                   throws java.lang.Exception
Throws:
java.lang.Exception

getOneAliasIndex

Index<java.lang.Long,E> getOneAliasIndex()

setOneAliasIndex

void setOneAliasIndex(Index<java.lang.Long,E> index)
                      throws java.lang.Exception
Throws:
java.lang.Exception

getSubAliasIndex

Index<java.lang.Long,E> getSubAliasIndex()

setSubAliasIndex

void setSubAliasIndex(Index<java.lang.Long,E> index)
                      throws java.lang.Exception
Throws:
java.lang.Exception

getUpdnIndex

Index<java.lang.String,E> getUpdnIndex()

setUpdnIndex

void setUpdnIndex(Index<java.lang.String,E> index)
                  throws java.lang.Exception
Throws:
java.lang.Exception

getNdnIndex

Index<java.lang.String,E> getNdnIndex()

setNdnIndex

void setNdnIndex(Index<java.lang.String,E> index)
                 throws java.lang.Exception
Throws:
java.lang.Exception

userIndices

java.util.Iterator<java.lang.String> userIndices()

systemIndices

java.util.Iterator<java.lang.String> systemIndices()

hasUserIndexOn

boolean hasUserIndexOn(java.lang.String id)
                       throws java.lang.Exception
Throws:
java.lang.Exception

hasSystemIndexOn

boolean hasSystemIndexOn(java.lang.String id)
                         throws java.lang.Exception
Throws:
java.lang.Exception

getUserIndex

Index<?,E> getUserIndex(java.lang.String id)
                        throws IndexNotFoundException
Throws:
IndexNotFoundException

getSystemIndex

Index<?,E> getSystemIndex(java.lang.String id)
                          throws IndexNotFoundException
Throws:
IndexNotFoundException

getEntryId

java.lang.Long getEntryId(java.lang.String dn)
                          throws java.lang.Exception
Throws:
java.lang.Exception

getEntryDn

java.lang.String getEntryDn(java.lang.Long id)
                            throws java.lang.Exception
Throws:
java.lang.Exception

getParentId

java.lang.Long getParentId(java.lang.String dn)
                           throws java.lang.Exception
Gets the Long id of an entry's parent using the child entry's normalized dn. Note that the suffix entry returns 0, which does not map to any entry.

Parameters:
dn - the normalized distinguished name of the child
Returns:
the id of the parent entry or zero if the suffix entry the normalized suffix dn string is used
Throws:
java.lang.Exception - on failures to access the underlying store

getParentId

java.lang.Long getParentId(java.lang.Long childId)
                           throws java.lang.Exception
Throws:
java.lang.Exception

getEntryUpdn

java.lang.String getEntryUpdn(java.lang.Long id)
                              throws java.lang.Exception
Throws:
java.lang.Exception

getEntryUpdn

java.lang.String getEntryUpdn(java.lang.String dn)
                              throws java.lang.Exception
Throws:
java.lang.Exception

count

int count()
          throws java.lang.Exception
Throws:
java.lang.Exception

add

void add(org.apache.directory.shared.ldap.name.LdapDN normName,
         ServerEntry entry)
         throws java.lang.Exception
Throws:
java.lang.Exception

lookup

ServerEntry lookup(java.lang.Long id)
                   throws java.lang.Exception
Throws:
java.lang.Exception

delete

void delete(java.lang.Long id)
            throws java.lang.Exception
Throws:
java.lang.Exception

list

IndexCursor<java.lang.Long,E> list(java.lang.Long id)
                                   throws java.lang.Exception
Gets an IndexEntry Cursor over the child nodes of an entry.

Parameters:
id - the id of the parent entry
Returns:
an IndexEntry Cursor over the child entries
Throws:
java.lang.Exception - on failures to access the underlying store

getChildCount

int getChildCount(java.lang.Long id)
                  throws java.lang.Exception
Throws:
java.lang.Exception

getSuffix

org.apache.directory.shared.ldap.name.LdapDN getSuffix()

getUpSuffix

org.apache.directory.shared.ldap.name.LdapDN getUpSuffix()

setProperty

void setProperty(java.lang.String propertyName,
                 java.lang.String propertyValue)
                 throws java.lang.Exception
Throws:
java.lang.Exception

getProperty

java.lang.String getProperty(java.lang.String propertyName)
                             throws java.lang.Exception
Throws:
java.lang.Exception

modify

void modify(org.apache.directory.shared.ldap.name.LdapDN dn,
            org.apache.directory.shared.ldap.entry.ModificationOperation modOp,
            ServerEntry mods)
            throws java.lang.Exception
Throws:
java.lang.Exception

modify

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
Throws:
java.lang.Exception

rename

void rename(org.apache.directory.shared.ldap.name.LdapDN dn,
            org.apache.directory.shared.ldap.name.Rdn newRdn,
            boolean deleteOldRdn)
            throws java.lang.Exception
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. Name changes propagate down as dn changes to the descendants of the entry where the Rdn changed. An Rdn change operation does not change parent child relationships. It merely propagates a name change at a point in the DIT where the Rdn is changed. The change propagates down the subtree rooted at the distinguished name specified.

Parameters:
dn - the normalized distinguished name of the entry to alter
newRdn - the new Rdn to set
deleteOldRdn - whether or not to remove the old Rdn attr/val
Throws:
java.lang.Exception - if there are any errors propagating the name changes

move

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
Throws:
java.lang.Exception

move

void move(org.apache.directory.shared.ldap.name.LdapDN oldChildDn,
          org.apache.directory.shared.ldap.name.LdapDN newParentDn)
          throws java.lang.Exception
Throws:
java.lang.Exception

initRegistries

void initRegistries(Registries registries)


Copyright © 2003-2009 Apache Software Foundation. All Rights Reserved.