Package org.hibernate.search.backend
Interface Worker
- All Known Implementing Classes:
TransactionalWorker
public interface Worker
Perform work for a given context (eg a transaction). This implementation has to be threaded-safe.
-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()clean resources This method can return exceptionsvoidflushWorks(TransactionContext transactionContext) Flush any work queue.voidinitialize(Properties props, WorkerBuildContext context) voidperformWork(Work<?> work, TransactionContext transactionContext) Declare a work to be done within a given transaction context
-
Method Details
-
performWork
Declare a work to be done within a given transaction context- Parameters:
work- the work to be executedtransactionContext- transactional context information
-
initialize
-
close
void close()clean resources This method can return exceptions -
flushWorks
Flush any work queue.- Parameters:
transactionContext- the current transaction (context).
-