net.sourceforge.domian.repository
Class AbstractDomianCoreRepository<T extends Entity>
java.lang.Object
net.sourceforge.domian.repository.AbstractRepository<T>
net.sourceforge.domian.repository.AbstractDomianCoreRepository<T>
- All Implemented Interfaces:
- Repository<T>
- Direct Known Subclasses:
- HashSetRepository, HibernateRepository, InMemoryAndXStreamXmlFileRepository, InMemoryRepository, NotImplementedRepository, NullRepository, PartitionRepositoryInvocationHandler, UnsupportedRepository, XStreamXmlFilePerEntityRepository
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
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 |
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.
AbstractDomianCoreRepository
public AbstractDomianCoreRepository()
getSynchronizer
protected Synchronizer getSynchronizer()
setSynchronizer
public void setSynchronizer(Synchronizer synchronizer)
createUniqueSpecificationFor
protected Specification<T> createUniqueSpecificationFor(T entity)
- Description copied from class:
AbstractRepository
- Template method for creating unique specification for given entity
- Specified by:
createUniqueSpecificationFor
in class AbstractRepository<T extends Entity>
- Returns:
- Guaranteed unique specification for given entity
makePartition
public PartitionRepository<T> makePartition()
- Description copied from interface:
Repository
- Promotes this repository to a
PartitionRepository
.
- Returns:
- a partitioned version of this repository
onMakePartition
protected void onMakePartition()
- Description copied from class:
AbstractRepository
- Template method for partitioning callbacks.
- Specified by:
onMakePartition
in class AbstractRepository<T extends Entity>
Copyright © 2006-2010. All Rights Reserved.