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; }
accessorPool = new DataFileAccessorPool(this); started = true;
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; }
accessorPool = new DataFileAccessorPool(this); started = true;
accessorPool = new DataFileAccessorPool(this); started = true;
accessorPool = new DataFileAccessorPool(this); started = true;