public interface FlowFileRepository extends Closeable
Modifier and Type | Method and Description |
---|---|
long |
getMaxFlowFileIdentifier() |
long |
getNextFlowFileSequence() |
long |
getStorageCapacity() |
long |
getUsableStorageSpace() |
void |
initialize(ResourceClaimManager claimManager)
Initializes the Content Repository, providing to it the
ContentClaimManager that is to be used for interacting with Content
Claims
|
boolean |
isVolatile() |
long |
loadFlowFiles(QueueProvider queueProvider,
long minimumSequenceNumber)
Loads all flow files found within the repository, establishes the content
claims and their reference count
|
void |
swapFlowFilesIn(String swapLocation,
List<FlowFileRecord> flowFileRecords,
FlowFileQueue flowFileQueue)
Updates the Repository to indicate that the given FlowFileRecpords were
Swapped In to memory
|
void |
swapFlowFilesOut(List<FlowFileRecord> swappedOut,
FlowFileQueue flowFileQueue,
String swapLocation)
Updates the Repository to indicate that the given FlowFileRecords were
Swapped Out of memory
|
void |
updateRepository(Collection<RepositoryRecord> records)
Updates the repository with the given RepositoryRecords.
|
void initialize(ResourceClaimManager claimManager) throws IOException
claimManager
- for handling claimsIOException
- if unable to initialize repositorylong getStorageCapacity() throws IOException
IOException
- if computing capacity failslong getUsableStorageSpace() throws IOException
IOException
- if computing usable space failsvoid updateRepository(Collection<RepositoryRecord> records) throws IOException
records
- the records to update the repository withIOException
- if update failslong loadFlowFiles(QueueProvider queueProvider, long minimumSequenceNumber) throws IOException
queueProvider
- the provider of FlowFile Queues into which the
FlowFiles should be enqueuedminimumSequenceNumber
- specifies the minimum value that should be
returned by a call to getNextFlowFileSequence()
IOException
- if load failsboolean isVolatile()
true
if the Repository is volatile (i.e., its data
is lost upon application restart), false
otherwiselong getNextFlowFileSequence()
FlowFile
s.long getMaxFlowFileIdentifier() throws IOException
FlowFile
s that currently exist in
the repository.IOException
- if computing max identifier failsvoid swapFlowFilesOut(List<FlowFileRecord> swappedOut, FlowFileQueue flowFileQueue, String swapLocation) throws IOException
swappedOut
- the FlowFiles that were swapped out of memoryflowFileQueue
- the queue that the FlowFiles belong toswapLocation
- the location to which the FlowFiles were swappedIOException
- if swap failsvoid swapFlowFilesIn(String swapLocation, List<FlowFileRecord> flowFileRecords, FlowFileQueue flowFileQueue) throws IOException
swapLocation
- the location (e.g., a filename) from which FlowFiles
were recoveredflowFileRecords
- the records that were swapped inflowFileQueue
- the queue that the FlowFiles belong toIOException
- if swap failsCopyright © 2016 Apache NiFi Project. All rights reserved.