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

java.lang.Object
  extended by net.sourceforge.domian.repository.AbstractRepository<T>
      extended by net.sourceforge.domian.repository.AbstractDomianCoreRepository<T>
          extended by net.sourceforge.domian.repository.PartitionRepositoryInvocationHandler<T>
              extended by net.sourceforge.domian.repository.PartitionRepositoryReuseInvocationHandler<T>
All Implemented Interfaces:
java.lang.reflect.InvocationHandler, PartitionRepository<T>, PersistentRepository<T>, Repository<T>

public final class PartitionRepositoryReuseInvocationHandler<T extends Entity>
extends PartitionRepositoryInvocationHandler<T>

...

Since:
0.4.2
Author:
Eirik Torske

Field Summary
 
Fields inherited from class net.sourceforge.domian.repository.PartitionRepositoryInvocationHandler
executeOperationsExclusivelyOnly, iteratorRegistry, partitionSpecification, repositoryDelegate, repositoryDelegateIsAlreadyPartitioned, subPartitions, superPartitionRepository, superPartitionSpecification, synchronizer
 
Fields inherited from class net.sourceforge.domian.repository.AbstractDomianCoreRepository
DEFAULT_DOMIAN_ROOT_DIR_NAME, DEFAULT_DOMIAN_ROOT_PATH, log
 
Fields inherited from class net.sourceforge.domian.repository.AbstractRepository
supportsRecursiveIndexing, usesNativePartitioningSupport
 
Method Summary
<V extends T>
PartitionRepository<V>
addPartitionFor(Specification<V> partitionSpecification, Repository<? super V> partitionRepository)
          Adds a new partition to this repository.
<V extends T>
PartitionRepository<V>
addPartitionFor(Specification<V> partitionSpecification, java.lang.String repositoryId)
          Adds a new partition to this repository.
<V extends T>
java.lang.Boolean
repartition(V entity)
          Since partition repositories are common, no moving entities around between different repository implementations are necessary.
 
Methods inherited from class net.sourceforge.domian.repository.PartitionRepositoryInvocationHandler
addPartition, addPartitionFor, close, collectAllPartitions, collectAllPartitionsWithRepositorySatisfying, conditionalSynchronizedExecutionOf, countAllEntitiesWithoutSpecificationSharpening, entityExists_PossiblyInWrongPartition, findAllEntitiesSpecifiedBy, findAllEntitiesSpecifiedBy, findPartitionFor, findSingleEntitySpecifiedBy, getAllPartitions, getCorrectPartitionRepository, getFormat, getMetaDataFor, getPartitionOnlyEntities, getPartitions, getPartitionSpecification, getPersistenceDefinition, getRepositoryDirectory, getRepositoryId, getRootRepository, getSuperPartitionRepository, getSuperPartitionSpecification, getTargetRepository, getType, handlePartitionRepositoryException, invoke, isIndexingEntitiesRecursively, isLeafPartition, isPartitioningNatively, isRootPartition, iterateAllEntitiesSpecifiedBy, load, persist, put, remove, removeAllEntitiesSpecifiedBy, removePartitionOnlyEntity, repartition, repositoryExemptFromSyncronization, repositoryOperationsNeedToBeExecutedExclusively, setPartitionSpecification, setSuperPartitionRepository, setSuperPartitionSpecification, update, wireUpPartition
 
Methods inherited from class net.sourceforge.domian.repository.AbstractDomianCoreRepository
createUniqueSpecificationFor, getSynchronizer, makePartition, onMakePartition, setSynchronizer
 
Methods inherited from class net.sourceforge.domian.repository.AbstractRepository
contains, count, countAll, countAllEntitiesSpecifiedBy, find, findAll, findSingle, 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
count, countAll, countAllEntitiesSpecifiedBy, find, findAll, findSingle, iterate, iterateAll, makePartition, putAll, remove, removeAll, update
 

Method Detail

addPartitionFor

public <V extends T> PartitionRepository<V> addPartitionFor(Specification<V> partitionSpecification,
                                                            java.lang.String repositoryId)
Description copied from interface: PartitionRepository
Adds a new partition to this repository. The partition is specified (indexed) by a Specification. The new partition repository will be of the same type as this repository.

Specified by:
addPartitionFor in interface PartitionRepository<T extends Entity>
Overrides:
addPartitionFor in class PartitionRepositoryInvocationHandler<T extends Entity>
Parameters:
partitionSpecification - the specification specifying the partition
repositoryId - the repository id; a non-blank value is mandatory for all persistent repositories
Returns:
the newly created partition

addPartitionFor

public <V extends T> PartitionRepository<V> addPartitionFor(Specification<V> partitionSpecification,
                                                            Repository<? super V> partitionRepository)
Description copied from interface: PartitionRepository
Adds a new partition to this repository. The partition is specified (indexed) by a Specification.

Specified by:
addPartitionFor in interface PartitionRepository<T extends Entity>
Overrides:
addPartitionFor in class PartitionRepositoryInvocationHandler<T extends Entity>
Parameters:
partitionSpecification - the specification specifying the partition
partitionRepository - the partition repository
Returns:
the newly created partition

repartition

public <V extends T> java.lang.Boolean repartition(V entity)
Since partition repositories are common, no moving entities around between different repository implementations are necessary.

Specified by:
repartition in interface PartitionRepository<T extends Entity>
Overrides:
repartition in class PartitionRepositoryInvocationHandler<T extends Entity>
Parameters:
entity - the entity to be repartitioned
Returns:
true if entity was repartitioned


Copyright © 2006-2010. All Rights Reserved.