Examples of SectorException


Examples of org.sd_network.vfs.sector.SectorException

        _writeLockedSet.add(fileID);
        clearUsedBytes();
        try {
            return new SectorOutputStream(fileID, this);
        } catch (Exception e) {
            throw new SectorException(e);
        }
    }
View Full Code Here

Examples of org.sd_network.vfs.sector.SectorException

        clearUsedBytes();
        try {
            Sector lastSector = SectorDB.getLastSector(fileID);
            return new SectorOutputStream(lastSector, this);
        } catch (Exception e) {
            throw new SectorException(e);
        }
    }
View Full Code Here

Examples of org.sd_network.vfs.sector.SectorException

        _readLockedSet.add(fileID);
        try {
            return new SectorInputStream(fileID, this);
        } catch (Exception e) {
            throw new SectorException(e);
        }
    }
View Full Code Here

Examples of org.sd_network.vfs.sector.SectorException

        // setup database connection informations.
        try {
            ConnectionPool pool = ConnectionPool.getInstance("vfssector");
        } catch (ConnectionPoolException e) {
            throw new SectorException(e.getMessage());
        }

        try {
            // setup database scheme.
            Schema.setup();
        } catch (DBException e) {
            throw new SectorException(
                    "Database error occurred. " + e.getMessage(), e);
        }

        // setup etc.
        Config config = Config.getInstance();
        try {
            _availableBytes = Long.parseLong(
                    config.getProperty(_PROP_AVAILABLEBYTES));
        } catch (NumberFormatException e) {
            throw new SectorException(
                    "Invalid property " + _PROP_AVAILABLEBYTES + "]. " +
                    e.getMessage(), e);
        }
        clearUsedBytes();
        _initialized = true;
View Full Code Here

Examples of org.sd_network.vfs.sector.SectorException

        checkWriteLocked(fileID);

        try {
            return SectorDB.getFileSize(fileID);
        } catch (Exception e) {
            throw new SectorException(e);
        }
    }
View Full Code Here

Examples of org.sd_network.vfs.sector.SectorException

    private void checkInitialized()
        throws SectorException
    {
        if (!_initialized)
            throw new SectorException("SectorDriver not initialized.");
    }
View Full Code Here

Examples of org.sd_network.vfs.sector.SectorException

    private void checkReadLocked(String fileID)
        throws SectorException
    {
        if (_readLockedSet.contains(fileID))
            throw new SectorException(
                    "Speicified file have been read locked.");
    }
View Full Code Here

Examples of org.sd_network.vfs.sector.SectorException

    private void checkWriteLocked(String fileID)
        throws SectorException
    {
        if (_writeLockedSet.contains(fileID))
            throw new SectorException(
                    "Specified file have been write locked.");
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.