The requirement to be thread safe has a few implementation implications for data sources:
Any state that is shared with
runFullAcquisition()
needs to be synchronized withstop()
. State may be share withcheckFullAcquisitionRequired()
and the binary content interfaces (BinaryContentFileProvider
andBinaryContentInputStreamProvider
).If you are supporting text extraction by implementing either the
BinaryContentFileProvider
interface or theBinaryContentInputStreamProvider
interface, the data source must be thread safe because CAS Server callsBinaryContentFileProvider.getBinaryContentFile()
orBinaryContentInputStreamProvider.getBinaryContentInputStream()
from multiple threads.