Package org.apache.jackrabbit.core.journal

Examples of org.apache.jackrabbit.core.journal.JournalException


                collection.add(record.readQName());
            }
            break;
        default:
            String msg = "Unknown opcode: " + opcode;
            throw new JournalException(msg);
        }
    }
View Full Code Here


        }

        if (this.action != null) {
            this.action.read(record);
        } else {
            throw new JournalException("Unknown workspace action type");
        }
    }
View Full Code Here

        record.writeInt(getActionType());

        if (action != null) {
            action.write(record);
        } else {
            throw new JournalException("Can not write empty workspace action");
        }
    }
View Full Code Here

                public void process(ClusterRecordProcessor processor) {
                }
            };
            break;
        default:
            throw new JournalException("Unknown record identifier: " + c);
        }
        return clusterRecord;
    }
View Full Code Here

            case EVENT_IDENTIFIER:
                readEventRecord();
                break;
            default:
                String msg = "Unknown identifier: " + identifier;
                throw new JournalException(msg);
            }
            identifier = record.readChar();
        }
    }
View Full Code Here

            state.setStatus(ItemState.STATUS_EXISTING_MODIFIED);
            changes.modified(state);
            break;
        default:
            String msg = "Unknown item operation: " + operation;
            throw new JournalException(msg);
        }
    }
View Full Code Here

    static boolean failRecordWrite = false;

    @Override
    protected void doLock() throws JournalException {
        if (refuseLock) {
            throw new JournalException("lock refused");
        } else {
            super.doLock();
        }
    }
View Full Code Here

            protected AppendRecord createRecord() throws JournalException {
                return new AppendRecord(TestJournal.this, identifier) {
                    @Override
                    public void writeString(String s) throws JournalException {
                        if (failRecordWrite) {
                            throw new JournalException("write failed");
                        } else {
                            super.writeString(s);
                        }
                    }
                };
View Full Code Here

        while (off < data.length) {
            try {
                int len = in.read(data, off, data.length - off);
                if (len < 0) {
                    String msg = "Unexpected end of record after " + off + " bytes.";
                    throw new JournalException(msg);
                }
                off += len;
            } catch (IOException e) {
                String msg = "I/O error after " + off + " bytes.";
                throw new JournalException(msg, e);
            }
        }
        try {
            Thread.sleep(writeDelay);
        } catch (InterruptedException e) {
            throw new JournalException("Interrupted in append().");
        }
        records.add(new MemoryRecord(getId(), record.getProducerId(), data));
        record.setRevision(records.size());
    }
View Full Code Here

    /**
     * Check state of this journal.
     */
    private void checkState() throws JournalException {
        if (closed) {
            throw new JournalException("Journal closed.");
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.core.journal.JournalException

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.