directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Trustin Lee <trus...@gmail.com>
Subject [apacheds] The first phase of refactoring ended.
Date Mon, 20 Jun 2005 18:09:49 GMT
Hi all,

I refactored org.apache.ldap.server.db package and ContextPartitions
in 'db_refactor' branch, and it is done.  (I called this 'the fist
phase' because I didn't do anything related with transaction support)

I'll summarize more in detail after I merge this branch.  Here's a
very short summary:

* BackingStore is removed and merged into ContextPartition
* PartitionNexus is renamed to ContextPartitionNexus, and became an
abstract class to provide some static methods moved from
SystemPartition.
* RootNexus is renamed to DefaultContextPartitionNexus

DefaultContextPartitionNexus initializes SystemPartition and other
application partitions when it initializes.  This is well known
composite pattern.  DefaultContextFactoryConfiguration.initialize()
calls DefaultContextPartitionNexus.init(), and it calls init() for all
registered context partitions.  And please note that there's no need
to explicitly call register() or unregister() method because
DefaultContextPartitionNexus can get partition configurations from
StartupConfiguration and therefore can initialize partitions by
itself.

* db package is heavily refactored.  Database interface is removed and
JdbmDatabase is replaced with JdbmContextPartition, which extends
BTreeDatabase and implements ContextPartition directly.  Most
B-tree-specific classes are moved to
org.apache.ldap.server.partition.impl.btree package, and jdbm package
became its child.

So now, overall API looks cleaner IMHO.

Please feel free to look around here:

http://svn.apache.org/viewcvs.cgi/directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/partition/

and to give me any criticisms.

Trustin
-- 
what we call human nature is actually human habit
--
http://gleamynode.net/

Mime
View raw message