public interface ContentClaimManager
Modifier and Type | Method and Description |
---|---|
int |
decrementClaimantCount(ContentClaim claim)
Decreases by 1 the count of how many FlowFiles hold a claim to a
particular piece of FlowFile content and returns the new count
|
void |
drainDestructableClaims(Collection<ContentClaim> destination,
int maxElements)
Drains up to
maxElements Content Claims from the internal queue
of destructable content claims to the given destination so that
they can be destroyed. |
void |
drainDestructableClaims(Collection<ContentClaim> destination,
int maxElements,
long timeout,
TimeUnit unit)
Drains up to
maxElements Content Claims from the internal queue
of destructable content claims to the given destination so that
they can be destroyed. |
int |
getClaimantCount(ContentClaim claim)
Returns the number of FlowFiles that hold a claim to a particular piece
of FlowFile content
|
int |
incrementClaimantCount(ContentClaim claim)
Increases by 1 the count of how many FlowFiles hold a claim to a
particular piece of FlowFile content and returns the new count
|
int |
incrementClaimantCount(ContentClaim claim,
boolean newClaim)
Increases by 1 the count of how many FlowFiles hold a claim to a
particular piece of FlowFile content and returns the new count.
|
void |
markDestructable(ContentClaim claim)
Indicates that the given ContentClaim can now be destroyed by the
appropriate Content Repository.
|
ContentClaim |
newContentClaim(String container,
String section,
String id,
boolean lossTolerant)
Creates a new Content Claim with the given id, container, section, and
loss tolerance.
|
void |
purge()
Clears the manager's memory of any and all ContentClaims that it knows
about
|
ContentClaim newContentClaim(String container, String section, String id, boolean lossTolerant)
id
- container
- section
- lossTolerant
- int getClaimantCount(ContentClaim claim)
claim
- int decrementClaimantCount(ContentClaim claim)
claim
- int incrementClaimantCount(ContentClaim claim)
claim
- int incrementClaimantCount(ContentClaim claim, boolean newClaim)
true
as the second argument, as it may allow the manager to
optimize its tasks, knowing that the Content Claim cannot be referenced
by any other componentclaim
- newClaim
- void markDestructable(ContentClaim claim)
Using this method of marking the ContentClaim as destructable only when the FlowFile repository has been synced with the underlying storage mechanism, we can ensure that on restart, we will not point to this unneeded claim. As such, it is now safe to destroy the contents.
claim
- void drainDestructableClaims(Collection<ContentClaim> destination, int maxElements)
maxElements
Content Claims from the internal queue
of destructable content claims to the given destination
so that
they can be destroyed.destination
- maxElements
- void drainDestructableClaims(Collection<ContentClaim> destination, int maxElements, long timeout, TimeUnit unit)
maxElements
Content Claims from the internal queue
of destructable content claims to the given destination
so that
they can be destroyed. If no ContentClaim is ready to be destroyed at
this time, will wait up to the specified amount of time before returning.
If, after the specified amount of time, there is still no ContentClaim
ready to be destroyed, the method will return without having added
anything to the given destination
.destination
- maxElements
- timeout
- unit
- void purge()
Copyright © 2015 Apache NiFi(incubating) Project. All rights reserved.