org.jrdf.set
Class BdbSortedSetFactory

java.lang.Object
  extended by org.jrdf.set.BdbSortedSetFactory
All Implemented Interfaces:
SortedSetFactory

public class BdbSortedSetFactory
extends Object
implements SortedSetFactory


Constructor Summary
BdbSortedSetFactory(BdbEnvironmentHandler newHandler, String newDatabaseName)
           
 
Method Summary
 void close()
          Close any resources used by the factory - possibly database connections, file handles and the like.
<T> SortedSet<T>
createSet(Class<T> clazz)
          Creates a sorted set for known type.
<T> SortedSet<T>
createSet(Class<T> clazz, Comparator<?> comparator)
          Creates a sorted set for a known type with a given comparator.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BdbSortedSetFactory

public BdbSortedSetFactory(BdbEnvironmentHandler newHandler,
                           String newDatabaseName)
Method Detail

createSet

public <T> SortedSet<T> createSet(Class<T> clazz)
Description copied from interface: SortedSetFactory
Creates a sorted set for known type. The supported types depend on the implementation - current implementations support types such as Triple and PredicateNode. Otherwise, it will produce a sorted set without a comparator - which will need to be added later.

Specified by:
createSet in interface SortedSetFactory
Parameters:
clazz - The type of set to create.
Returns:
A sorted set.

createSet

public <T> SortedSet<T> createSet(Class<T> clazz,
                                  Comparator<?> comparator)
Description copied from interface: SortedSetFactory
Creates a sorted set for a known type with a given comparator. This allows non-supported types to be added. This is optional and may not be supported by all implementations.

Specified by:
createSet in interface SortedSetFactory
Parameters:
clazz - The type of set to create.
comparator - The comparator to use to determine the sort order.
Returns:
A sorted set.

close

public void close()
Description copied from interface: SortedSetFactory
Close any resources used by the factory - possibly database connections, file handles and the like. It is expected that a factory used that is not close may cause resource leaks.

Specified by:
close in interface SortedSetFactory