net.sourceforge.domian.repository
Class AbstractHibernateRepository<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.AbstractHibernateRepository<T>
All Implemented Interfaces:
Repository<T>

Deprecated.

@Deprecated
abstract class AbstractHibernateRepository<T extends Entity>
extends AbstractDomianCoreRepository<T>


Field Summary
private static int ALL_STACKTRACE_LINES
          Deprecated.  
private  java.lang.Integer maxNumberOfRetries
          Deprecated. When using the *WithRetry methods, this value defines the maximum number of times an operation will be retried.
private  java.lang.Integer retryTimeoutInMilliseconds
          Deprecated. When using the *WithRetry methods, this value defines the timeout for all retried operations.
 
Fields inherited from class net.sourceforge.domian.repository.AbstractDomianCoreRepository
DEFAULT_DOMIAN_ROOT_DIR_NAME, DEFAULT_DOMIAN_ROOT_PATH, log, synchronizer
 
Fields inherited from class net.sourceforge.domian.repository.AbstractRepository
supportsRecursiveIndexing, usesNativePartitioningSupport
 
Constructor Summary
AbstractHibernateRepository()
          Deprecated.  
 
Method Summary
protected  void call(java.util.concurrent.Callable<T> callable)
          Deprecated. Added for completeness.
protected
<T> T
callConcurrently(java.util.concurrent.Callable<T> callable)
          Deprecated. Convenience method for running a Callable in a concurrent manner.
protected
<T> T
callConcurrentlyInNewThread(java.util.concurrent.Callable<T> callable)
          Deprecated.  
protected
<T> T
callConcurrentlyWithRetry(java.util.concurrent.Callable<T> callable)
          Deprecated. Convenience method for running a Callable in a concurrent manner.
protected
<T> T
callExclusively(java.util.concurrent.Callable<T> callable)
          Deprecated. Convenience method for running a Callable in an exclusively manner.
protected
<T> T
callExclusivelyInNewThread(java.util.concurrent.Callable<T> callable)
          Deprecated.  
protected
<T> T
callExclusivelyWithRetry(java.util.concurrent.Callable<T> callable)
          Deprecated. Convenience method for running a Callable in an exclusively manner.
protected
<T> T
callInNewThread(java.util.concurrent.Callable<T> callable)
          Deprecated.  
 java.lang.Integer getMaxNumberOfRetries()
          Deprecated.  
 java.lang.Integer getRetryTimeoutInMilliseconds()
          Deprecated.  
private
<T> T
retry(java.util.concurrent.Callable<T> callable, java.lang.Exception retryReason, Synchronizer.MODE synchronizedMode)
          Deprecated. Executes the given Callable in a fresh thread, with time-out set to retryTimeoutInMilliseconds.
private
<T> T
retry(java.lang.String methodName, java.util.concurrent.Callable<T> callable, java.lang.Exception reasonForRetry, Synchronizer.MODE synchronizedMode)
          Deprecated. Executes the given Callable in a fresh thread, with time-out set to retryTimeoutInMilliseconds.
protected  void run(java.lang.Runnable runnable)
          Deprecated. Added for completeness.
protected  void runAsynchronously(java.lang.Runnable runnable)
          Deprecated. Executes the given Runnable in a fresh and independent thread.
protected  void runConcurrently(java.lang.Runnable runnable)
          Deprecated. Convenience method for running a Runnable in a concurrent manner.
 void setMaxNumberOfRetries(java.lang.Integer maxNumberOfRetries)
          Deprecated.  
 void setRetryTimeoutInMilliseconds(java.lang.Integer retryTimeoutInMilliseconds)
          Deprecated.  
 
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, 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

ALL_STACKTRACE_LINES

private static final int ALL_STACKTRACE_LINES
Deprecated. 
See Also:
Constant Field Values

maxNumberOfRetries

private java.lang.Integer maxNumberOfRetries
Deprecated. 
When using the *WithRetry methods, this value defines the maximum number of times an operation will be retried.

The default value is 2.


retryTimeoutInMilliseconds

private java.lang.Integer retryTimeoutInMilliseconds
Deprecated. 
When using the *WithRetry methods, this value defines the timeout for all retried operations.

The default value is 500.

Constructor Detail

AbstractHibernateRepository

AbstractHibernateRepository()
Deprecated. 
Method Detail

getMaxNumberOfRetries

public java.lang.Integer getMaxNumberOfRetries()
Deprecated. 

setMaxNumberOfRetries

public void setMaxNumberOfRetries(java.lang.Integer maxNumberOfRetries)
Deprecated. 

getRetryTimeoutInMilliseconds

public java.lang.Integer getRetryTimeoutInMilliseconds()
Deprecated. 

setRetryTimeoutInMilliseconds

public void setRetryTimeoutInMilliseconds(java.lang.Integer retryTimeoutInMilliseconds)
Deprecated. 

run

protected void run(java.lang.Runnable runnable)
Deprecated. 
Added for completeness.


call

protected void call(java.util.concurrent.Callable<T> callable)
             throws java.lang.Exception
Deprecated. 
Added for completeness.

Throws:
java.lang.Exception

runConcurrently

protected void runConcurrently(java.lang.Runnable runnable)
Deprecated. 
Convenience method for running a Runnable in a concurrent manner.

See Also:
Synchronizer

callConcurrently

protected <T> T callConcurrently(java.util.concurrent.Callable<T> callable)
Deprecated. 
Convenience method for running a Callable in a concurrent manner.

See Also:
Synchronizer

callExclusively

protected <T> T callExclusively(java.util.concurrent.Callable<T> callable)
Deprecated. 
Convenience method for running a Callable in an exclusively manner.

See Also:
Synchronizer

callConcurrentlyWithRetry

protected <T> T callConcurrentlyWithRetry(java.util.concurrent.Callable<T> callable)
Deprecated. 
Convenience method for running a Callable in a concurrent manner. If an exception is thrown, the Callable will be immediately retried. The nature of the retries are further defined by the maxNumberOfRetries and retryTimeoutInMilliseconds member values.


callExclusivelyWithRetry

protected <T> T callExclusivelyWithRetry(java.util.concurrent.Callable<T> callable)
Deprecated. 
Convenience method for running a Callable in an exclusively manner. If an exception is thrown, the Callable will be immediately queued for retrial. The nature of the retries are further defined by the maxNumberOfRetries and retryTimeoutInMilliseconds member values.


callInNewThread

protected <T> T callInNewThread(java.util.concurrent.Callable<T> callable)
                     throws java.util.concurrent.ExecutionException,
                            java.util.concurrent.TimeoutException,
                            java.lang.InterruptedException
Deprecated. 
Throws:
java.util.concurrent.ExecutionException
java.util.concurrent.TimeoutException
java.lang.InterruptedException

callConcurrentlyInNewThread

protected <T> T callConcurrentlyInNewThread(java.util.concurrent.Callable<T> callable)
                                 throws java.util.concurrent.ExecutionException,
                                        java.util.concurrent.TimeoutException,
                                        java.lang.InterruptedException
Deprecated. 
Throws:
java.util.concurrent.ExecutionException
java.util.concurrent.TimeoutException
java.lang.InterruptedException

callExclusivelyInNewThread

protected <T> T callExclusivelyInNewThread(java.util.concurrent.Callable<T> callable)
                                throws java.util.concurrent.ExecutionException,
                                       java.util.concurrent.TimeoutException,
                                       java.lang.InterruptedException
Deprecated. 
Throws:
java.util.concurrent.ExecutionException
java.util.concurrent.TimeoutException
java.lang.InterruptedException

runAsynchronously

protected void runAsynchronously(java.lang.Runnable runnable)
Deprecated. 
Executes the given Runnable in a fresh and independent thread. This method does not block the original thread. The Synchronizer mode is concurrent. (An asynchronous version of Synchronizer in exclusive mode has no meaning, as it is a "stop-the-world" kind of mode.)


retry

private <T> T retry(java.util.concurrent.Callable<T> callable,
                    java.lang.Exception retryReason,
                    Synchronizer.MODE synchronizedMode)
Deprecated. 
Executes the given Callable in a fresh thread, with time-out set to retryTimeoutInMilliseconds. The Callable will be retried maxNumberOfRetries times.

This method will use an uncapitalized version of the given callable's simple class name as method name.


retry

private <T> T retry(java.lang.String methodName,
                    java.util.concurrent.Callable<T> callable,
                    java.lang.Exception reasonForRetry,
                    Synchronizer.MODE synchronizedMode)
Deprecated. 
Executes the given Callable in a fresh thread, with time-out set to retryTimeoutInMilliseconds. The Callable will be retried maxNumberOfRetries times.



Copyright © 2009-2010. All Rights Reserved.