public void close() throws IOException { synchronized (this) { if (!started) { return; } cleanupTask.cancel(true); if (preAllocateNextDataFileFuture != null) { preAllocateNextDataFileFuture.cancel(true); } ThreadPoolUtils.shutdownGraceful(scheduler, 4000); accessorPool.close(); } // the appender can be calling back to to the journal blocking a close AMQ-5620 appender.close(); synchronized (currentDataFile) { fileMap.clear(); fileByFileMap.clear(); dataFiles.clear(); lastAppendLocation.set(null); started = false; } }
public synchronized boolean delete() throws IOException { // Close all open file handles... appender.close(); accessorPool.close(); boolean result = true; for (Iterator<DataFile> i = fileMap.values().iterator(); i.hasNext();) { DataFile dataFile = i.next(); result &= dataFile.delete(); } if (preAllocateNextDataFileFuture != null) { preAllocateNextDataFileFuture.cancel(true); } synchronized (dataFileIdLock) { if (nextDataFile != null) { nextDataFile.delete(); nextDataFile = null; } } totalLength.set(0); synchronized (currentDataFile) { fileMap.clear(); fileByFileMap.clear(); lastAppendLocation.set(null); dataFiles = new LinkedNodeList<DataFile>(); } // reopen open file handles... accessorPool = new DataFileAccessorPool(this); appender = new DataFileAppender(this); return result; }
public void close() throws IOException { synchronized (this) { if (!started) { return; } cleanupTask.cancel(true); if (preAllocateNextDataFileFuture != null) { preAllocateNextDataFileFuture.cancel(true); } ThreadPoolUtils.shutdownGraceful(scheduler, 4000); accessorPool.close(); } // the appender can be calling back to to the journal blocking a close AMQ-5620 appender.close(); synchronized (currentDataFile) { fileMap.clear(); fileByFileMap.clear(); dataFiles.clear(); lastAppendLocation.set(null); started = false; } }
public void close() throws IOException { synchronized (this) { if (!started) { return; } cleanupTask.cancel(true); if (preAllocateNextDataFileFuture != null) { preAllocateNextDataFileFuture.cancel(true); } ThreadPoolUtils.shutdownGraceful(scheduler, 4000); accessorPool.close(); } // the appender can be calling back to to the journal blocking a close AMQ-5620 appender.close(); synchronized (currentDataFile) { fileMap.clear(); fileByFileMap.clear(); dataFiles.clear(); lastAppendLocation.set(null); started = false; } }
public void close() throws IOException { synchronized (this) { if (!started) { return; } cleanupTask.cancel(true); if (preAllocateNextDataFileFuture != null) { preAllocateNextDataFileFuture.cancel(true); } ThreadPoolUtils.shutdownGraceful(scheduler, 4000); accessorPool.close(); } // the appender can be calling back to to the journal blocking a close AMQ-5620 appender.close(); synchronized (currentDataFile) { fileMap.clear(); fileByFileMap.clear(); dataFiles.clear(); lastAppendLocation.set(null); started = false; } }
public synchronized boolean delete() throws IOException { // Close all open file handles... appender.close(); accessorPool.close(); boolean result = true; for (Iterator<DataFile> i = fileMap.values().iterator(); i.hasNext();) { DataFile dataFile = i.next(); result &= dataFile.delete(); } if (preAllocateNextDataFileFuture != null) { preAllocateNextDataFileFuture.cancel(true); } synchronized (dataFileIdLock) { if (nextDataFile != null) { nextDataFile.delete(); nextDataFile = null; } } totalLength.set(0); synchronized (currentDataFile) { fileMap.clear(); fileByFileMap.clear(); lastAppendLocation.set(null); dataFiles = new LinkedNodeList<DataFile>(); } // reopen open file handles... accessorPool = new DataFileAccessorPool(this); appender = new DataFileAppender(this); return result; }
public synchronized boolean delete() throws IOException { // Close all open file handles... appender.close(); accessorPool.close(); boolean result = true; for (Iterator<DataFile> i = fileMap.values().iterator(); i.hasNext();) { DataFile dataFile = i.next(); result &= dataFile.delete(); } if (preAllocateNextDataFileFuture != null) { preAllocateNextDataFileFuture.cancel(true); } synchronized (dataFileIdLock) { if (nextDataFile != null) { nextDataFile.delete(); nextDataFile = null; } } totalLength.set(0); synchronized (currentDataFile) { fileMap.clear(); fileByFileMap.clear(); lastAppendLocation.set(null); dataFiles = new LinkedNodeList<DataFile>(); } // reopen open file handles... accessorPool = new DataFileAccessorPool(this); appender = new DataFileAppender(this); return result; }
public synchronized boolean delete() throws IOException { // Close all open file handles... appender.close(); accessorPool.close(); boolean result = true; for (Iterator<DataFile> i = fileMap.values().iterator(); i.hasNext();) { DataFile dataFile = i.next(); result &= dataFile.delete(); } if (preAllocateNextDataFileFuture != null) { preAllocateNextDataFileFuture.cancel(true); } synchronized (dataFileIdLock) { if (nextDataFile != null) { nextDataFile.delete(); nextDataFile = null; } } totalLength.set(0); synchronized (currentDataFile) { fileMap.clear(); fileByFileMap.clear(); lastAppendLocation.set(null); dataFiles = new LinkedNodeList<DataFile>(); } // reopen open file handles... accessorPool = new DataFileAccessorPool(this); appender = new DataFileAppender(this); return result; }