Package com.persistit.exception

Examples of com.persistit.exception.VolumeAlreadyExistsException


    synchronized void create() throws PersistitException {
        if (_opened) {
            throw new IllegalStateException("Volume " + this + " cannot be reopened");
        }
        if (exists()) {
            throw new VolumeAlreadyExistsException(getPath());
        }
        try {
            _channel = new MediatedFileChannel(getPath(), "rw");
            lockChannel();
            truncate();
View Full Code Here


    void addVolume(final Volume volume) throws VolumeAlreadyExistsException {
        synchronized (_volumes) {
            Volume otherVolume;
            otherVolume = getVolume(volume.getName());
            if (otherVolume != null) {
                throw new VolumeAlreadyExistsException("Volume " + otherVolume);
            }
            _volumes.add(volume);
        }
    }
View Full Code Here

    synchronized void addVolume(final Volume volume) throws VolumeAlreadyExistsException {
        Volume otherVolume;
        otherVolume = getVolume(volume.getName());
        if (otherVolume != null) {
            throw new VolumeAlreadyExistsException("Volume " + otherVolume);
        }
        _volumes.add(volume);
    }
View Full Code Here

        boolean opened = false;
        try {
            if (exists) {
                if (_specification.isCreateOnly()) {
                    throw new VolumeAlreadyExistsException(_specification.getPath());
                }
                _storage.open();
                opened = true;
            } else {
                if (!_specification.isCreate()) {
View Full Code Here

        boolean opened = false;
        try {
            if (exists) {
                if (_specification.isCreateOnly()) {
                    throw new VolumeAlreadyExistsException(_specification.getPath());
                }
                _storage.open();
                opened = true;
            } else {
                if (!_specification.isCreate()) {
View Full Code Here

    synchronized void addVolume(final Volume volume) throws VolumeAlreadyExistsException {
        Volume otherVolume;
        otherVolume = getVolume(volume.getName());
        if (otherVolume != null) {
            throw new VolumeAlreadyExistsException("Volume " + otherVolume);
        }
        _volumes.add(volume);
    }
View Full Code Here

        boolean opened = false;
        try {
            if (exists) {
                if (_specification.isCreateOnly()) {
                    throw new VolumeAlreadyExistsException(_specification.getPath());
                }
                _storage.open();
                opened = true;
            } else {
                if (!_specification.isCreate()) {
View Full Code Here

        _storage = new VolumeStorageV2(persistit, this);
        _statistics = new VolumeStatistics();

        if (exists) {
            if (_specification.isCreateOnly()) {
                throw new VolumeAlreadyExistsException(_specification.getPath());
            }
            _storage.open();
        } else {
            if (!_specification.isCreate()) {
                throw new VolumeNotFoundException(_specification.getPath());
View Full Code Here

    synchronized void create() throws PersistitException {
        if (_opened) {
            throw new IllegalStateException("Volume " + this + " cannot be reopened");
        }
        if (exists()) {
            throw new VolumeAlreadyExistsException(getPath());
        }
        try {
            _channel = new MediatedFileChannel(getPath(), "rw");
            lockChannel();
            truncate();
View Full Code Here

    synchronized void addVolume(Volume volume) throws VolumeAlreadyExistsException {
        Volume otherVolume;
        otherVolume = getVolume(volume.getName());
        if (otherVolume != null) {
            throw new VolumeAlreadyExistsException("Volume " + otherVolume);
        }
        _volumes.add(volume);
    }
View Full Code Here

TOP

Related Classes of com.persistit.exception.VolumeAlreadyExistsException

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.