net.sourceforge.domian.repository
Class AbstractDomianCoreRepository<T extends Entity>

java.lang.Object
  extended by net.sourceforge.domian.repository.AbstractRepository<T>
      extended by net.sourceforge.domian.repository.AbstractDomianCoreRepository<T>
All Implemented Interfaces:
Repository<T>
Direct Known Subclasses:
HashSetRepository, InMemoryRepository, NotImplementedRepository, NullRepository, PartitionRepositoryInvocationHandler, UnsupportedRepository

public abstract class AbstractDomianCoreRepository<T extends Entity>
extends AbstractRepository<T>

All Domian Core-based Repository classes should extend this abstract class. It adds partitioning capabilities through the PartitionRepositoryInvocationHandler class.

A SLF4J logger instance is provided in this class.

Since:
0.5
Author:
Eirik Torske

Field Summary
static java.lang.String DEFAULT_DOMIAN_ROOT_DIR_NAME
           
static java.lang.String DEFAULT_DOMIAN_ROOT_PATH
           
protected  org.slf4j.Logger log
           
protected  Synchronizer synchronizer
          A synchronizer used to control concurrent and exclusive access to repository methods.
 
Fields inherited from class net.sourceforge.domian.repository.AbstractRepository
supportsRecursiveIndexing, usesNativePartitioningSupport
 
Constructor Summary
AbstractDomianCoreRepository()
           
 
Method Summary
protected  Specification<T> createUniqueSpecificationFor(T entity)
           
private static java.lang.Class[] getAllRelevantRepositoryInterfaces(Repository repository)
           
private  java.lang.reflect.InvocationHandler getInvocationHandler()
           
protected  Synchronizer getSynchronizer()
           
 PartitionRepository<T> makePartition()
           
protected  void onMakePartition()
           
 void setSynchronizer(Synchronizer synchronizer)
           
 
Methods inherited from class net.sourceforge.domian.repository.AbstractRepository
contains, count, countAll, countAllEntitiesSpecifiedBy, find, findAll, findSingle, findSingleEntitySpecifiedBy, isIndexingEntitiesRecursively, isPartitioningNatively, iterate, iterateAll, putAll, remove, removeAll, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.sourceforge.domian.repository.Repository
findAllEntitiesSpecifiedBy, iterateAllEntitiesSpecifiedBy, put, remove, removeAllEntitiesSpecifiedBy, update
 

Field Detail

DEFAULT_DOMIAN_ROOT_DIR_NAME

public static final java.lang.String DEFAULT_DOMIAN_ROOT_DIR_NAME
See Also:
Constant Field Values

DEFAULT_DOMIAN_ROOT_PATH

public static final java.lang.String DEFAULT_DOMIAN_ROOT_PATH

log

protected final org.slf4j.Logger log

synchronizer

protected Synchronizer synchronizer
A synchronizer used to control concurrent and exclusive access to repository methods. E.g. all methods dealing with partitioning are run in an exclusive manner.

Constructor Detail

AbstractDomianCoreRepository

public AbstractDomianCoreRepository()
Method Detail

getSynchronizer

protected Synchronizer getSynchronizer()

setSynchronizer

public void setSynchronizer(Synchronizer synchronizer)

createUniqueSpecificationFor

protected Specification<T> createUniqueSpecificationFor(T entity)
Specified by:
createUniqueSpecificationFor in class AbstractRepository<T extends Entity>

getInvocationHandler

private java.lang.reflect.InvocationHandler getInvocationHandler()

makePartition

public PartitionRepository<T> makePartition()

onMakePartition

protected void onMakePartition()
Specified by:
onMakePartition in class AbstractRepository<T extends Entity>

getAllRelevantRepositoryInterfaces

private static java.lang.Class[] getAllRelevantRepositoryInterfaces(Repository repository)


Copyright © 2006-2010. All Rights Reserved.