org.hibernate.search.query.engine.impl
Class TimeoutManagerImpl

java.lang.Object
  extended by org.hibernate.search.query.engine.impl.TimeoutManagerImpl
All Implemented Interfaces:
TimeoutManager

public class TimeoutManagerImpl
extends Object
implements TimeoutManager

Author:
Emmanuel Bernard

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.hibernate.search.query.engine.spi.TimeoutManager
TimeoutManager.Type
 
Constructor Summary
TimeoutManagerImpl(Query query, TimeoutExceptionFactory timeoutExceptionFactory, TimingSource timingSource)
           
 
Method Summary
 void forceTimedOut()
           
 Counter getLuceneTimeoutCounter()
           
 Long getTimeoutLeftInMilliseconds()
           
 Long getTimeoutLeftInSeconds()
           
 TimeoutManager.Type getType()
           
 boolean hasPartialResults()
           
 boolean isTimedOut()
           
 void limitFetchingOnTimeout()
           
 void raiseExceptionOnTimeout()
           
 void reactOnQueryTimeoutExceptionWhileExtracting(RuntimeException e)
           
 void setTimeout(long timeout, TimeUnit timeUnit)
           
 void start()
          we start counting from this method call (if needed)
 void stop()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TimeoutManagerImpl

public TimeoutManagerImpl(Query query,
                          TimeoutExceptionFactory timeoutExceptionFactory,
                          TimingSource timingSource)
Method Detail

start

public void start()
we start counting from this method call (if needed)

Specified by:
start in interface TimeoutManager

getTimeoutLeftInMilliseconds

public Long getTimeoutLeftInMilliseconds()
Specified by:
getTimeoutLeftInMilliseconds in interface TimeoutManager

getTimeoutLeftInSeconds

public Long getTimeoutLeftInSeconds()
Specified by:
getTimeoutLeftInSeconds in interface TimeoutManager

isTimedOut

public boolean isTimedOut()
Specified by:
isTimedOut in interface TimeoutManager

stop

public void stop()
Specified by:
stop in interface TimeoutManager

setTimeout

public void setTimeout(long timeout,
                       TimeUnit timeUnit)
Specified by:
setTimeout in interface TimeoutManager

forceTimedOut

public void forceTimedOut()

raiseExceptionOnTimeout

public void raiseExceptionOnTimeout()
Specified by:
raiseExceptionOnTimeout in interface TimeoutManager

limitFetchingOnTimeout

public void limitFetchingOnTimeout()
Specified by:
limitFetchingOnTimeout in interface TimeoutManager

reactOnQueryTimeoutExceptionWhileExtracting

public void reactOnQueryTimeoutExceptionWhileExtracting(RuntimeException e)
Specified by:
reactOnQueryTimeoutExceptionWhileExtracting in interface TimeoutManager

hasPartialResults

public boolean hasPartialResults()
Specified by:
hasPartialResults in interface TimeoutManager

getType

public TimeoutManager.Type getType()
Specified by:
getType in interface TimeoutManager

getLuceneTimeoutCounter

public Counter getLuceneTimeoutCounter()


Copyright © 2006-2013 Red Hat, Inc. All Rights Reserved