Permalink
Browse files

Allow the container and test suites to trigger a clean exit for async…

… cache
  • Loading branch information...
timf committed Jun 13, 2011
1 parent 1a3fd5a commit 0b50fa863215f8b6c60ef47b9ece436735313326
@@ -31,5 +31,9 @@
* @throws ResourceRequestDeniedException If this type of request is disabled
*/
public void addRequest(AsyncRequest request) throws ResourceRequestDeniedException;
/**
* Allow container shutdown and test suites to signal a clean exit.
*/
public void shutdownImmediately();
}
@@ -1216,4 +1216,14 @@ public synchronized Integer getMaxVMs() {
return maxVMs;
}
// -----------------------------------------------------------------------------------------
// LIFECYCLE
// -----------------------------------------------------------------------------------------
public void shutdownImmediately() {
if (this.asyncRequestMap != null) {
this.asyncRequestMap.shutdownImmediately();
}
}
}
@@ -139,4 +139,10 @@ private void loadAllFromDisk() throws IOException {
}
logger.info("Found " + count + " spot requests on disk.");
}
void shutdownImmediately() {
if (this.cache != null) {
this.cache.removeAll();
}
}
}
@@ -189,7 +189,7 @@ public void setCreation(CreationManager creationImpl) {
// -------------------------------------------------------------------------
public String report() {
final StringBuffer buf = new StringBuffer("Class: ");
final StringBuilder buf = new StringBuilder("Class: ");
buf.append(this.getClass().getName())
.append("\n")
.append("Workspace Service Manager");
@@ -225,6 +225,7 @@ public void recover_initialize() throws Exception {
public void shutdownImmediately() {
this.home.shutdownImmediately();
this.asyncHome.shutdownImmediately();
}

0 comments on commit 0b50fa8

Please sign in to comment.