net.sourceforge.domian.test.benchmark
Class AbstractQueenPuzzle

java.lang.Object
  extended by net.sourceforge.domian.entity.AbstractEntity
      extended by net.sourceforge.domian.entity.AbstractUUIDEntity
          extended by net.sourceforge.domian.test.benchmark.AbstractQueenPuzzle
All Implemented Interfaces:
Entity
Direct Known Subclasses:
ConcurrentQueenPuzzle, SequentialQueenPuzzle

abstract class AbstractQueenPuzzle
extends AbstractUUIDEntity


Nested Class Summary
(package private) static class AbstractQueenPuzzle.RepositoryType
           
 
Field Summary
private  java.util.logging.Logger log
           
protected  long logInterval
           
protected  long numberOfConstellations
           
protected  int numberOfWorkers
           
(package private) static Specification<QueenPuzzleConstellation> processedQueenPuzzleConstellations
           
(package private) static Specification<QueenPuzzleConstellation> queenPuzzleConstellationsThatInherentlySolvesTheQueenPuzzle
           
(package private) static Specification<QueenPuzzleConstellation> queenPuzzleConstellationsThatIsProcessedAndMarkedAsToSolveTheQueenPuzzle
           
protected  AbstractQueenPuzzle.RepositoryType repositoryType
           
protected  java.util.Collection<? extends QueenPuzzleConstellation> successfulQueenPuzzleConstellations
           
(package private) static Specification<QueenPuzzleConstellation> unProcessedQueenPuzzleConstellations
           
 
Fields inherited from class net.sourceforge.domian.entity.AbstractUUIDEntity
entityId
 
Fields inherited from class net.sourceforge.domian.entity.AbstractEntity
timeOfCreation, version
 
Constructor Summary
AbstractQueenPuzzle(AbstractQueenPuzzle.RepositoryType repositoryType, long numberOfConstellations, int numberOfWorkers, long logInterval)
           
 
Method Summary
protected  void addOneWellKnownSuccessfulQueenPuzzleConstellationInto(Repository<QueenPuzzleConstellation> repo)
          Adding correct constellation (A1, B5, C8, D6, E3, F7, G2, H4)
protected  Repository<QueenPuzzleConstellation> createRepository(AbstractQueenPuzzle.RepositoryType repositoryType)
           
protected  void doCompletionControl(Repository<QueenPuzzleConstellation> repo)
           
protected  void doPersist(PersistentRepository<QueenPuzzleConstellation> repo)
           
protected  void doPrintProcessStatistics(long elapsedTimeInNanos, long numberOfConstellations)
           
protected  void doRepartition(PartitionRepository<QueenPuzzleConstellation> repo)
           
protected  void doResultSearch(Repository<QueenPuzzleConstellation> repo)
           
protected  void generateQueenPuzzleConstellationsAndPutInto(Repository repo)
           
(package private) abstract  void solvePuzzle()
           
 
Methods inherited from class net.sourceforge.domian.entity.AbstractUUIDEntity
getEntityId
 
Methods inherited from class net.sourceforge.domian.entity.AbstractEntity
doWarnLog, equals, getTimeOfCreation, getVersion, hashCode, isEntity, isValueObject, setVersion, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

log

private final java.util.logging.Logger log

queenPuzzleConstellationsThatInherentlySolvesTheQueenPuzzle

static final Specification<QueenPuzzleConstellation> queenPuzzleConstellationsThatInherentlySolvesTheQueenPuzzle

unProcessedQueenPuzzleConstellations

static final Specification<QueenPuzzleConstellation> unProcessedQueenPuzzleConstellations

processedQueenPuzzleConstellations

static final Specification<QueenPuzzleConstellation> processedQueenPuzzleConstellations

queenPuzzleConstellationsThatIsProcessedAndMarkedAsToSolveTheQueenPuzzle

static final Specification<QueenPuzzleConstellation> queenPuzzleConstellationsThatIsProcessedAndMarkedAsToSolveTheQueenPuzzle

numberOfConstellations

protected long numberOfConstellations

numberOfWorkers

protected int numberOfWorkers

logInterval

protected long logInterval

repositoryType

protected AbstractQueenPuzzle.RepositoryType repositoryType

successfulQueenPuzzleConstellations

protected java.util.Collection<? extends QueenPuzzleConstellation> successfulQueenPuzzleConstellations
Constructor Detail

AbstractQueenPuzzle

AbstractQueenPuzzle(AbstractQueenPuzzle.RepositoryType repositoryType,
                    long numberOfConstellations,
                    int numberOfWorkers,
                    long logInterval)
Method Detail

solvePuzzle

abstract void solvePuzzle()

createRepository

protected Repository<QueenPuzzleConstellation> createRepository(AbstractQueenPuzzle.RepositoryType repositoryType)

addOneWellKnownSuccessfulQueenPuzzleConstellationInto

protected void addOneWellKnownSuccessfulQueenPuzzleConstellationInto(Repository<QueenPuzzleConstellation> repo)
Adding correct constellation (A1, B5, C8, D6, E3, F7, G2, H4)


generateQueenPuzzleConstellationsAndPutInto

protected void generateQueenPuzzleConstellationsAndPutInto(Repository repo)

doPrintProcessStatistics

protected void doPrintProcessStatistics(long elapsedTimeInNanos,
                                        long numberOfConstellations)

doRepartition

protected void doRepartition(PartitionRepository<QueenPuzzleConstellation> repo)

doPersist

protected void doPersist(PersistentRepository<QueenPuzzleConstellation> repo)

doResultSearch

protected void doResultSearch(Repository<QueenPuzzleConstellation> repo)

doCompletionControl

protected void doCompletionControl(Repository<QueenPuzzleConstellation> repo)


Copyright © 2008-2010. All Rights Reserved.