Merge branch 'NIFI164' into bootstrap

This commit is contained in:
Mark Payne 2014-12-12 10:01:17 -05:00
commit 8cf0c7814e
4 changed files with 21 additions and 0 deletions

View File

@ -1050,6 +1050,10 @@ public class FlowController implements EventAccess, ControllerServiceProvider, H
processScheduler.shutdown();
}
if ( contentRepository != null ) {
contentRepository.shutdown();
}
if ( provenanceEventRepository != null ) {
try {
provenanceEventRepository.close();

View File

@ -223,6 +223,12 @@ public class FileSystemRepository implements ContentRepository {
this.contentClaimManager = claimManager;
}
@Override
public void shutdown() {
executor.shutdown();
containerCleanupExecutor.shutdown();
}
private static double getRatio(final String value) {
final String trimmed = value.trim();
final String percentage = trimmed.substring(0, trimmed.length() - 1);

View File

@ -137,6 +137,11 @@ public class VolatileContentRepository implements ContentRepository {
public void initialize(final ContentClaimManager claimManager) {
this.claimManager = claimManager;
}
@Override
public void shutdown() {
executor.shutdown();
}
/**
* Specifies a Backup Repository where data should be written if this

View File

@ -45,6 +45,12 @@ public interface ContentRepository {
*/
void initialize(ContentClaimManager claimManager) throws IOException;
/**
* Shuts down the Content Repository, freeing any resources that may be held.
* This is called when an administrator shuts down NiFi.
*/
void shutdown();
/**
* Returns the names of all Containers that exist for this Content
* Repository