Search in sources :

Example 1 with SwapFile

use of com.swiftmq.impl.store.standard.swap.SwapFile in project swiftmq-ce by iitsoftware.

the class NonPersistentStoreImpl method close.

public void close() throws StoreException {
    if (ctx.traceSpace.enabled)
        ctx.traceSpace.trace("sys$store", toString() + "/close...");
    try {
        if (swapFiles != null) {
            if (deleteSwapFilesOnClose()) {
                for (int i = 0; i < swapFiles.size(); i++) {
                    ((SwapFile) swapFiles.get(i)).close();
                }
            }
            swapFiles.clear();
            swapFiles = null;
            actSwapFile = null;
        }
    } catch (Exception e) {
        throw new StoreException(e.getMessage());
    }
    if (ctx.traceSpace.enabled)
        ctx.traceSpace.trace("sys$store", toString() + "/close...done");
}
Also used : SwapFile(com.swiftmq.impl.store.standard.swap.SwapFile) StoreException(com.swiftmq.swiftlet.store.StoreException) StoreException(com.swiftmq.swiftlet.store.StoreException)

Aggregations

SwapFile (com.swiftmq.impl.store.standard.swap.SwapFile)1 StoreException (com.swiftmq.swiftlet.store.StoreException)1