Package com.persistit.exception

Examples of com.persistit.exception.PersistitIOException


                } else {
                    throw savedException;
                }
            } catch (final IOException ioe) {
                throw new PersistitIOException(ioe);
            }
        }
    }
View Full Code Here


                _readBuffer.flip();
                if (_readBuffer.remaining() < size) {
                    throw new CorruptJournalException("End of file at " + addressToString(address));
                }
            } catch (final IOException e) {
                throw new PersistitIOException("Reading from " + addressToString(address), e);
            }
        }
    }
View Full Code Here

            }
        } catch (final FileNotFoundException fnfe) {
            // A friendlier exception when the properties file is not found.
            throw new PropertiesNotFoundException(fnfe.getMessage());
        } catch (final IOException ioe) {
            throw new PersistitIOException(ioe);
        }
        merge(properties);
        loadProperties();
    }
View Full Code Here

        if (channel == null) {
            try {
                channel = new MediatedFileChannel(addressToFile(address), "rw");
                _journalFileChannels.put(generation, channel);
            } catch (final IOException ioe) {
                throw new PersistitIOException(ioe);
            }
        }
        return channel;
    }
View Full Code Here

        while (bb.remaining() > 0) {
            int count;
            try {
                count = fc.read(bb, fileAddr);
            } catch (final IOException ioe) {
                throw new PersistitIOException(ioe);
            }
            if (count < 0) {
                final File file = addressToFile(address);
                throw new CorruptJournalException(String.format("End of file at %s:%d(%,d)", file, fileAddr, address));
            }
View Full Code Here

        synchronized (this) {
            try {
                closeAllChannels();
            } catch (final IOException ioe) {
                throw new PersistitIOException(ioe);
            } finally {
                _handleToTreeMap.clear();
                _handleToVolumeMap.clear();
                _volumeToHandleMap.clear();
                _treeToHandleMap.clear();
View Full Code Here

                    _persistit.getIOMeter().chargeFlushJournal(written, address);
                    return _writeBufferAddress;
                }
            } catch (final IOException e) {
                throw new PersistitIOException("Writing to file " + addressToFile(address), e);
            }
        }
        return Long.MAX_VALUE;
    }
View Full Code Here

            if (address != Long.MAX_VALUE) {
                final FileChannel channel = getFileChannel(address);
                channel.force(false);
            }
        } catch (final IOException e) {
            throw new PersistitIOException("Writing to file " + addressToFile(address), e);
        }
    }
View Full Code Here

                if (matches) {
                    channel.truncate(length);
                }
                channel.force(true);
            } catch (final IOException ioe) {
                throw new PersistitIOException(ioe);
            }
            _currentAddress = ((_currentAddress / _blockSize) + 1) * _blockSize;
            _writeBuffer.clear();
            _writeBufferAddress = _currentAddress;
            _isNewEpoch = false;
View Full Code Here

                final File file = File.createTempFile(TEMP_FILE_PREFIX, null, directory);
                _path = file.getPath();
                _channel = new MediatedFileChannel(_path, "rw");
            } catch (final IOException ioe) {
                _persistit.getLogBase().tempVolumeCreateException.log(ioe, _path);
                throw new PersistitIOException(ioe);
            }
        }
        return _channel;
    }
View Full Code Here

TOP

Related Classes of com.persistit.exception.PersistitIOException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.