Package com.sleepycat.util

Examples of com.sleepycat.util.RuntimeExceptionWrapper


                        new ByteArrayInputStream(data.getData(),
                                                 data.getOffset(),
                                                 data.getSize()));
                classFormat = (ObjectStreamClass) ois.readObject();
            } catch (IOException e) {
                throw new RuntimeExceptionWrapper(e);
            }

            /* Update the class format map. */

            formatMap.put(classIDObj, classFormat);
View Full Code Here


            ObjectOutputStream oos;
            try {
                oos = new ObjectOutputStream(baos);
                oos.writeObject(classFormat);
            } catch (IOException e) {
                throw new RuntimeExceptionWrapper(e);
            }
            data.setData(baos.toByteArray());

            cursor.put(key, data);
View Full Code Here

            /*
             * Do not throw IOException from here since ObjectOutputStream
             * will write the exception to the stream, which causes another
             * call here, etc.
             */
            throw new RuntimeExceptionWrapper(e);
        } catch (ClassNotFoundException e) {
            throw new RuntimeExceptionWrapper(e);
        }
    }
View Full Code Here

        // first it sets the transient key fields from the stored key.
        MarshalledTupleEntry obj;
        try {
            obj = (MarshalledTupleEntry) cls.newInstance();
        } catch (IllegalAccessException e) {
            throw new RuntimeExceptionWrapper(e);
        } catch (InstantiationException e) {
            throw new RuntimeExceptionWrapper(e);
        }
        if (dataInput != null) { // may be null if used by key extractor
            obj.unmarshalEntry(dataInput);
        }
        MarshalledTupleKeyEntity entity = (MarshalledTupleKeyEntity) obj;
View Full Code Here

                        new ByteArrayInputStream(data.getData(),
                                                 data.getOffset(),
                                                 data.getSize()));
                classFormat = (ObjectStreamClass) ois.readObject();
            } catch (IOException e) {
                throw new RuntimeExceptionWrapper(e);
            }

            /* Update the class format map. */

            formatMap.put(classIDObj, classFormat);
View Full Code Here

            ObjectOutputStream oos;
            try {
                oos = new ObjectOutputStream(baos);
                oos.writeObject(classFormat);
            } catch (IOException e) {
                throw new RuntimeExceptionWrapper(e);
            }
            data.setData(baos.toByteArray());

            cursor.put(key, data);
View Full Code Here

    @Test
    protected void testApplyModificationsThrowsOriginalDatabaseException() throws Exception {
        start();
        DatabaseException ex = new DatabaseException();
        runner.run(isA(TransactionWorker.class));
        expectLastCall().andThrow(new RuntimeExceptionWrapper(ex));
        replayAll();
        cs.start();
        try {
            cs.applyModifications(Collections.singletonList(new Store(InternalEntryFactory.create("k", "v"))));
            assert false : "should have gotten an exception";
View Full Code Here

        DatabaseException ex = new DatabaseException();
        com.sleepycat.je.Transaction txn = createMock(com.sleepycat.je.Transaction.class);
        expect(currentTransaction.beginTransaction(null)).andReturn(txn);
        runner.prepare(isA(TransactionWorker.class));
        txn.commit();
        expectLastCall().andThrow(new RuntimeExceptionWrapper(ex));
        replayAll();
        replay(txn);
        cs.start();
        try {
            txn = currentTransaction.beginTransaction(null);
View Full Code Here

    @Test
    protected void testPrepareThrowsOriginalDatabaseException() throws Exception {
        start();
        DatabaseException ex = new DatabaseException();
        runner.prepare(isA(TransactionWorker.class));
        expectLastCall().andThrow(new RuntimeExceptionWrapper(ex));
        replayAll();
        cs.start();
        try {
            GlobalTransaction tx = new GlobalTransaction(false);
            cs.prepare(Collections.singletonList(new Store(InternalEntryFactory.create("k", "v"))), tx, false);
View Full Code Here

   public InternalCacheEntry entryToObject(DatabaseEntry entry) {
      try {
         return (InternalCacheEntry) m.objectFromByteBuffer(entry.getData());
      } catch (IOException e) {
         throw new RuntimeExceptionWrapper(e);
      } catch (ClassNotFoundException e) {
         throw new RuntimeExceptionWrapper(e);
      }
   }
View Full Code Here

TOP

Related Classes of com.sleepycat.util.RuntimeExceptionWrapper

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.