|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.atlassian.confluence.search.lucene.queue.DatabaseIndexTaskQueue
public class DatabaseIndexTaskQueue
An implementation of the IndexTaskQueue backed by the database.
Field Summary | |
---|---|
static org.apache.log4j.Logger |
log
Deprecated. since 3.1 do not use this class's logger externally. Create one in the class doing the logging. |
Constructor Summary | |
---|---|
DatabaseIndexTaskQueue()
|
Method Summary | |
---|---|
void |
afterPropertiesSet()
|
Date |
calculateLastFlushTime()
Returns the time of last flush as stored in memory (or in the timestampFile if value has not yet been initialised in memory), minus an arbitrary amount by which the time stamps could differ on the nodes in a cluster. |
void |
deleteOldEntries()
Delete all entries older then 2 days from the database. |
void |
destroy()
|
void |
enqueue(IndexTask task)
Add a new index task to the queue. |
void |
enqueueAll(Collection<IndexTask> tasks)
Add a collection of index tasks to the queue. |
void |
flushIndexTaskQueue(com.atlassian.config.lifecycle.events.ApplicationStartedEvent event)
Set the initial entry on the IndexQueueTracker. |
List<IndexTask> |
flushQueue()
Flush the contents of the queue, returning those elements currently queued as the result. |
List<IndexTask> |
flushQueue(int maxEntries)
Flush the contents of the queue, returning those elements currently queued as the result. |
List<IndexTask> |
getQueuedEntries()
Retrieve the list of index tasks currently queued. |
int |
getSize()
Retrieve the number of tasks currently queued. |
void |
reset()
Reseting the queue removes all queued index tasks from the queue without flushing. |
void |
setAnyTypeDao(AnyTypeDao anyTypeDao)
|
void |
setBootstrapManager(BootstrapManager bootstrapManager)
|
void |
setEventPublisher(com.atlassian.event.api.EventPublisher eventPublisher)
|
void |
setIndexQueueTracker(IndexQueueTracker indexQueueTracker)
|
void |
setIndexTaskFactory(IndexTaskFactory indexTaskFactory)
|
void |
setQueueEntryDao(IndexQueueEntryDao queueEntryDao)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
@Deprecated public static final org.apache.log4j.Logger log
Constructor Detail |
---|
public DatabaseIndexTaskQueue()
Method Detail |
---|
@EventListener public void flushIndexTaskQueue(com.atlassian.config.lifecycle.events.ApplicationStartedEvent event)
public void afterPropertiesSet() throws Exception
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
Exception
public void destroy() throws Exception
destroy
in interface org.springframework.beans.factory.DisposableBean
Exception
public void enqueue(IndexTask task)
enqueue
in interface IndexTaskQueue
public void enqueueAll(Collection<IndexTask> tasks)
enqueueAll
in interface IndexTaskQueue
public int getSize()
getSize
in interface IndexTaskQueue
public List<IndexTask> getQueuedEntries()
getQueuedEntries
in interface IndexTaskQueue
public List<IndexTask> flushQueue()
IndexTaskQueue
flushQueue
in interface IndexTaskQueue
public List<IndexTask> flushQueue(int maxEntries)
IndexTaskQueue
flushQueue
in interface IndexTaskQueue
maxEntries
- the maximum number of entries to return. This should return the n first entries in the queue.
public Date calculateLastFlushTime()
public void deleteOldEntries()
public void reset()
reset
in interface IndexTaskQueue
public void setQueueEntryDao(IndexQueueEntryDao queueEntryDao)
public void setBootstrapManager(BootstrapManager bootstrapManager)
public void setAnyTypeDao(AnyTypeDao anyTypeDao)
public void setIndexQueueTracker(IndexQueueTracker indexQueueTracker)
public void setIndexTaskFactory(IndexTaskFactory indexTaskFactory)
public void setEventPublisher(com.atlassian.event.api.EventPublisher eventPublisher)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |