Search in sources :

Example 21 with ExodusException

use of jetbrains.exodus.ExodusException in project xodus by JetBrains.

the class FileDataWriter method closeImpl.

@Override
protected void closeImpl() {
    final RandomAccessFile file = this.file;
    if (file == null) {
        throw new ExodusException("Can't close already closed FileDataWriter");
    }
    try {
        file.close();
        this.file = null;
    } catch (IOException e) {
        throw new ExodusException("Can't close FileDataWriter", e);
    }
}
Also used : RandomAccessFile(java.io.RandomAccessFile) IOException(java.io.IOException) ExodusException(jetbrains.exodus.ExodusException)

Aggregations

ExodusException (jetbrains.exodus.ExodusException)21 File (java.io.File)6 IOException (java.io.IOException)6 RandomAccessFile (java.io.RandomAccessFile)3 CriticalSection (jetbrains.exodus.core.execution.locks.CriticalSection)3 ByteIterable (jetbrains.exodus.ByteIterable)2 CompoundByteIterable (jetbrains.exodus.CompoundByteIterable)2 Job (jetbrains.exodus.core.execution.Job)2 EnvironmentImpl (jetbrains.exodus.env.EnvironmentImpl)2 FileDataReader (jetbrains.exodus.io.FileDataReader)2 FileDataWriter (jetbrains.exodus.io.FileDataWriter)2 SharedRandomAccessFile (jetbrains.exodus.util.SharedRandomAccessFile)2 UncheckedIOException (java.io.UncheckedIOException)1 ClosedChannelException (java.nio.channels.ClosedChannelException)1 FileChannel (java.nio.channels.FileChannel)1 Map (java.util.Map)1 Condition (java.util.concurrent.locks.Condition)1 Pair (jetbrains.exodus.core.dataStructures.Pair)1 LongHashMap (jetbrains.exodus.core.dataStructures.hash.LongHashMap)1 LongSet (jetbrains.exodus.core.dataStructures.hash.LongSet)1