Package com.persistit.exception

Examples of com.persistit.exception.InvalidKeyException


        final Key spareKey2 = exchange.getAuxiliaryKey2();
        spareKey1.copyTo(spareKey2);
        final byte[] baseBytes = spareKey2.getEncodedBytes();
        final int baseSize = spareKey2.getEncodedSize();
        if (baseSize < elisionCount || elisionCount + length > Key.MAX_KEY_LENGTH) {
            throw new InvalidKeyException("Key encoding in transaction is invalid");
        }
        System.arraycopy(bytes, offset, baseBytes, elisionCount, length);
        spareKey2.setEncodedSize(elisionCount + length);
    }
View Full Code Here


        }
    }

    void testValidForStoreAndFetch(final int bufferSize) throws InvalidKeyException {
        if (_size == 0) {
            throw new InvalidKeyException("Empty Key not permitted");
        } else if (_size > maxStorableKeySize(bufferSize)) {
            throw new InvalidKeyException("Key too long for buffer: " + _size);
        }
        final int b = _bytes[_size - 1] & 0xFF;
        if (b == TYPE_BEFORE || b == TYPE_AFTER) {
            throw new InvalidKeyException("BEFORE key or AFTER key not permitted");
        } else if (b != 0) {
            throw new InvalidKeyException("Invalid key segment terminator " + (b & 0xFF));
        }
    }
View Full Code Here

        }
    }

    void testValidForTraverse() throws InvalidKeyException {
        if (_size == 0) {
            throw new InvalidKeyException("Empty Key not permitted");
        }
    }
View Full Code Here

        }
    }

    void testValidForStoreAndFetch(final int bufferSize) throws InvalidKeyException {
        if (_size == 0) {
            throw new InvalidKeyException("Empty Key not permitted");
        } else if (_size > maxStorableKeySize(bufferSize)) {
            throw new InvalidKeyException("Key too long for buffer: " + _size);
        }
        final int b = _bytes[_size - 1] & 0xFF;
        if (b == TYPE_BEFORE || b == TYPE_AFTER) {
            throw new InvalidKeyException("BEFORE key or AFTER key not permitted");
        } else if (b != 0) {
            throw new InvalidKeyException("Invalid key segment terminator " + (b & 0xFF));
        }
    }
View Full Code Here

        }
    }

    void testValidForTraverse() throws InvalidKeyException {
        if (_size == 0) {
            throw new InvalidKeyException("Empty Key not permitted");
        }
    }
View Full Code Here

        }
    }

    void testValidForStoreAndFetch(final int bufferSize) throws InvalidKeyException {
        if (_size == 0) {
            throw new InvalidKeyException("Empty Key not permitted");
        } else if (_size > maxStorableKeySize(bufferSize)) {
            throw new InvalidKeyException("Key too long for buffer: " + _size);
        }
        final int b = _bytes[_size - 1] & 0xFF;
        if (b == TYPE_BEFORE || b == TYPE_AFTER) {
            throw new InvalidKeyException("BEFORE key or AFTER key not permitted");
        } else if (b != 0) {
            throw new InvalidKeyException("Invalid key segment terminator " + (b & 0xFF));
        }
    }
View Full Code Here

        }
    }

    void testValidForTraverse() throws InvalidKeyException {
        if (_size == 0) {
            throw new InvalidKeyException("Empty Key not permitted");
        }
    }
View Full Code Here

        }
    }

    void testValidForStoreAndFetch(int bufferSize) throws InvalidKeyException {
        if (_size == 0) {
            throw new InvalidKeyException("Empty Key not permitted");
        } else if (_size > maxStorableKeySize(bufferSize)) {
            throw new InvalidKeyException("Key too long for buffer: " + _size);
        }
        int b = _bytes[_size - 1] & 0xFF;
        if (b == TYPE_BEFORE || b == TYPE_AFTER) {
            throw new InvalidKeyException("BEFORE key or AFTER key not permitted");
        } else if (b != 0) {
            throw new InvalidKeyException("Invalid key segment terminator " + (b & 0xFF));
        }
    }
View Full Code Here

        }
    }

    void testValidForTraverse() throws InvalidKeyException {
        if (_size == 0) {
            throw new InvalidKeyException("Empty Key not permitted");
        }
    }
View Full Code Here

        Key spareKey2 = exchange.getAuxiliaryKey2();
        spareKey1.copyTo(spareKey2);
        byte[] baseBytes = spareKey2.getEncodedBytes();
        int baseSize = spareKey2.getEncodedSize();
        if (baseSize < elisionCount || elisionCount + length > Key.MAX_KEY_LENGTH) {
            throw new InvalidKeyException("Key encoding in transaction is invalid");
        }
        System.arraycopy(bytes, offset, baseBytes, elisionCount, length);
        spareKey2.setEncodedSize(elisionCount + length);
    }
View Full Code Here

TOP

Related Classes of com.persistit.exception.InvalidKeyException

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.