public void start() throws Exception { journal.start(); List<RecordInfo> committedRecords = new LinkedList<RecordInfo>(); List<PreparedTransactionInfo> preparedTransactions = new LinkedList<PreparedTransactionInfo>(); TransactionFailureCallback failureCallback = new TransactionFailureCallback() { public void failedTransaction(long l, List<RecordInfo> recordInfos, List<RecordInfo> recordInfos1) { tsLogger.i18NLogger.warn_journal_load_error(); } }; JournalLoadInformation journalLoadInformation = journal.load(committedRecords, preparedTransactions, failureCallback); maxID.set(journalLoadInformation.getMaxID()); if(!preparedTransactions.isEmpty()) { tsLogger.i18NLogger.warn_journal_load_error(); } for(RecordInfo record : committedRecords) { InputBuffer inputBuffer = new InputBuffer(record.data); Uid uid = UidHelper.unpackFrom(inputBuffer); String typeName = inputBuffer.unpackString(); getContentForType(typeName).put(uid, record); // don't unpack the rest yet, we may never need it. read_committed does it on demand. } }
public void start() throws Exception { journal.start(); List<RecordInfo> committedRecords = new LinkedList<RecordInfo>(); List<PreparedTransactionInfo> preparedTransactions = new LinkedList<PreparedTransactionInfo>(); TransactionFailureCallback failureCallback = new TransactionFailureCallback() { public void failedTransaction(long l, java.util.List<org.hornetq.core.journal.RecordInfo> recordInfos, java.util.List<org.hornetq.core.journal.RecordInfo> recordInfos1) { tsLogger.i18NLogger.warn_journal_load_error(); } }; JournalLoadInformation journalLoadInformation = journal.load(committedRecords, preparedTransactions, failureCallback); maxID = journalLoadInformation.getMaxID(); if(!preparedTransactions.isEmpty()) { tsLogger.i18NLogger.warn_journal_load_error(); } for(RecordInfo record : committedRecords) { InputBuffer inputBuffer = new InputBuffer(record.data); Uid uid = UidHelper.unpackFrom(inputBuffer); String typeName = inputBuffer.unpackString(); getContentForType(typeName).put(uid, record); // don't unpack the rest yet, we may never need it. read_committed does it on demand. } }
public void start() throws Exception { journal.start(); List<RecordInfo> committedRecords = new LinkedList<RecordInfo>(); List<PreparedTransactionInfo> preparedTransactions = new LinkedList<PreparedTransactionInfo>(); TransactionFailureCallback failureCallback = new TransactionFailureCallback() { public void failedTransaction(long l, List<RecordInfo> recordInfos, List<RecordInfo> recordInfos1) { tsLogger.i18NLogger.warn_journal_load_error(); } }; JournalLoadInformation journalLoadInformation = journal.load(committedRecords, preparedTransactions, failureCallback); maxID.set(journalLoadInformation.getMaxID()); if(!preparedTransactions.isEmpty()) { tsLogger.i18NLogger.warn_journal_load_error(); } for(RecordInfo record : committedRecords) { InputBuffer inputBuffer = new InputBuffer(record.data); Uid uid = UidHelper.unpackFrom(inputBuffer); String typeName = inputBuffer.unpackString(); getContentForType(typeName).put(uid, record); // don't unpack the rest yet, we may never need it. read_committed does it on demand. } }
public void start() throws Exception { journal.start(); List<RecordInfo> committedRecords = new LinkedList<RecordInfo>(); List<PreparedTransactionInfo> preparedTransactions = new LinkedList<PreparedTransactionInfo>(); TransactionFailureCallback failureCallback = new TransactionFailureCallback() { public void failedTransaction(long l, List<RecordInfo> recordInfos, List<RecordInfo> recordInfos1) { tsLogger.i18NLogger.warn_journal_load_error(); } }; JournalLoadInformation journalLoadInformation = journal.load(committedRecords, preparedTransactions, failureCallback); maxID.set(journalLoadInformation.getMaxID()); if(!preparedTransactions.isEmpty()) { tsLogger.i18NLogger.warn_journal_load_error(); } for(RecordInfo record : committedRecords) { InputBuffer inputBuffer = new InputBuffer(record.data); Uid uid = UidHelper.unpackFrom(inputBuffer); String typeName = inputBuffer.unpackString(); getContentForType(typeName).put(uid, record); // don't unpack the rest yet, we may never need it. read_committed does it on demand. } }
public void start() throws Exception { journal.start(); List<RecordInfo> committedRecords = new LinkedList<RecordInfo>(); List<PreparedTransactionInfo> preparedTransactions = new LinkedList<PreparedTransactionInfo>(); TransactionFailureCallback failureCallback = new TransactionFailureCallback() { public void failedTransaction(long l, List<RecordInfo> recordInfos, List<RecordInfo> recordInfos1) { tsLogger.i18NLogger.warn_journal_load_error(); } }; JournalLoadInformation journalLoadInformation = journal.load(committedRecords, preparedTransactions, failureCallback); maxID.set(journalLoadInformation.getMaxID()); if(!preparedTransactions.isEmpty()) { tsLogger.i18NLogger.warn_journal_load_error(); } for(RecordInfo record : committedRecords) { InputBuffer inputBuffer = new InputBuffer(record.data); Uid uid = UidHelper.unpackFrom(inputBuffer); String typeName = inputBuffer.unpackString(); getContentForType(typeName).put(uid, record); // don't unpack the rest yet, we may never need it. read_committed does it on demand. } }
public void start() throws Exception { journal.start(); List<RecordInfo> committedRecords = new LinkedList<RecordInfo>(); List<PreparedTransactionInfo> preparedTransactions = new LinkedList<PreparedTransactionInfo>(); TransactionFailureCallback failureCallback = new TransactionFailureCallback() { public void failedTransaction(long l, List<RecordInfo> recordInfos, List<RecordInfo> recordInfos1) { tsLogger.i18NLogger.warn_journal_load_error(); } }; JournalLoadInformation journalLoadInformation = journal.load(committedRecords, preparedTransactions, failureCallback); maxID.set(journalLoadInformation.getMaxID()); if(!preparedTransactions.isEmpty()) { tsLogger.i18NLogger.warn_journal_load_error(); } for(RecordInfo record : committedRecords) { InputBuffer inputBuffer = new InputBuffer(record.data); Uid uid = UidHelper.unpackFrom(inputBuffer); String typeName = inputBuffer.unpackString(); getContentForType(typeName).put(uid, record); // don't unpack the rest yet, we may never need it. read_committed does it on demand. } }
public void start() throws Exception { journal.start(); List<RecordInfo> committedRecords = new LinkedList<RecordInfo>(); List<PreparedTransactionInfo> preparedTransactions = new LinkedList<PreparedTransactionInfo>(); TransactionFailureCallback failureCallback = new TransactionFailureCallback() { public void failedTransaction(long l, java.util.List<org.hornetq.core.journal.RecordInfo> recordInfos, java.util.List<org.hornetq.core.journal.RecordInfo> recordInfos1) { tsLogger.i18NLogger.warn_journal_load_error(); } }; JournalLoadInformation journalLoadInformation = journal.load(committedRecords, preparedTransactions, failureCallback); maxID = journalLoadInformation.getMaxID(); if(!preparedTransactions.isEmpty()) { tsLogger.i18NLogger.warn_journal_load_error(); } for(RecordInfo record : committedRecords) { InputBuffer inputBuffer = new InputBuffer(record.data); Uid uid = UidHelper.unpackFrom(inputBuffer); String typeName = inputBuffer.unpackString(); getContentForType(typeName).put(uid, record); // don't unpack the rest yet, we may never need it. read_committed does it on demand. } }
public void start() throws Exception { journal.start(); List<RecordInfo> committedRecords = new LinkedList<RecordInfo>(); List<PreparedTransactionInfo> preparedTransactions = new LinkedList<PreparedTransactionInfo>(); TransactionFailureCallback failureCallback = new TransactionFailureCallback() { public void failedTransaction(long l, List<RecordInfo> recordInfos, List<RecordInfo> recordInfos1) { tsLogger.i18NLogger.warn_journal_load_error(); } }; JournalLoadInformation journalLoadInformation = journal.load(committedRecords, preparedTransactions, failureCallback); maxID.set(journalLoadInformation.getMaxID()); if(!preparedTransactions.isEmpty()) { tsLogger.i18NLogger.warn_journal_load_error(); } for(RecordInfo record : committedRecords) { InputBuffer inputBuffer = new InputBuffer(record.data); Uid uid = UidHelper.unpackFrom(inputBuffer); String typeName = inputBuffer.unpackString(); getContentForType(typeName).put(uid, record); // don't unpack the rest yet, we may never need it. read_committed does it on demand. } }
public void start() throws Exception { journal.start(); List<RecordInfo> committedRecords = new LinkedList<RecordInfo>(); List<PreparedTransactionInfo> preparedTransactions = new LinkedList<PreparedTransactionInfo>(); TransactionFailureCallback failureCallback = new TransactionFailureCallback() { public void failedTransaction(long l, java.util.List<org.hornetq.core.journal.RecordInfo> recordInfos, java.util.List<org.hornetq.core.journal.RecordInfo> recordInfos1) { tsLogger.i18NLogger.warn_journal_load_error(); } }; JournalLoadInformation journalLoadInformation = journal.load(committedRecords, preparedTransactions, failureCallback); maxID = journalLoadInformation.getMaxID(); if(!preparedTransactions.isEmpty()) { tsLogger.i18NLogger.warn_journal_load_error(); } for(RecordInfo record : committedRecords) { InputBuffer inputBuffer = new InputBuffer(record.data); Uid uid = UidHelper.unpackFrom(inputBuffer); String typeName = inputBuffer.unpackString(); getContentForType(typeName).put(uid, record); // don't unpack the rest yet, we may never need it. read_committed does it on demand. } }
public void start() throws Exception { journal.start(); List<RecordInfo> committedRecords = new LinkedList<RecordInfo>(); List<PreparedTransactionInfo> preparedTransactions = new LinkedList<PreparedTransactionInfo>(); TransactionFailureCallback failureCallback = new TransactionFailureCallback() { public void failedTransaction(long l, java.util.List<org.hornetq.core.journal.RecordInfo> recordInfos, java.util.List<org.hornetq.core.journal.RecordInfo> recordInfos1) { tsLogger.i18NLogger.warn_journal_load_error(); } }; JournalLoadInformation journalLoadInformation = journal.load(committedRecords, preparedTransactions, failureCallback); maxID = journalLoadInformation.getMaxID(); if(!preparedTransactions.isEmpty()) { tsLogger.i18NLogger.warn_journal_load_error(); } for(RecordInfo record : committedRecords) { InputBuffer inputBuffer = new InputBuffer(record.data); Uid uid = UidHelper.unpackFrom(inputBuffer); String typeName = inputBuffer.unpackString(); getContentForType(typeName).put(uid, record); // don't unpack the rest yet, we may never need it. read_committed does it on demand. } }
/** * Read the object's committed state. * * @param uid The object to work on. * @param typeName The type of the object to work on. * @return the state of the object. * @throws ObjectStoreException if things go wrong. */ public InputObjectState read_committed(Uid uid, String typeName) throws ObjectStoreException { RecordInfo record = getContentForType(typeName).get(uid); if(record == null) { return null; } // this repeated unpacking is a little inefficient - subclass RecordInfo to hold unpacked form too? // not too much of an issue as log reads are done for recovery only. try { InputBuffer inputBuffer = new InputBuffer(record.data); Uid unpackedUid = UidHelper.unpackFrom(inputBuffer); String unpackedTypeName = inputBuffer.unpackString(); InputObjectState inputObjectState = new InputObjectState(uid, typeName, inputBuffer.unpackBytes()); return inputObjectState; } catch(Exception e) { throw new ObjectStoreException(e); } }
/** * Read the object's committed state. * * @param uid The object to work on. * @param typeName The type of the object to work on. * @return the state of the object. * @throws ObjectStoreException if things go wrong. */ public InputObjectState read_committed(Uid uid, String typeName) throws ObjectStoreException { RecordInfo record = getContentForType(typeName).get(uid); if(record == null) { return null; } // this repeated unpacking is a little inefficient - subclass RecordInfo to hold unpacked form too? // not too much of an issue as log reads are done for recovery only. try { InputBuffer inputBuffer = new InputBuffer(record.data); UidHelper.unpackFrom(inputBuffer); inputBuffer.unpackString(); return new InputObjectState(uid, typeName, inputBuffer.unpackBytes()); } catch(Exception e) { throw new ObjectStoreException(e); } }
/** * Read the object's committed state. * * @param uid The object to work on. * @param typeName The type of the object to work on. * @return the state of the object. * @throws ObjectStoreException if things go wrong. */ public InputObjectState read_committed(Uid uid, String typeName) throws ObjectStoreException { RecordInfo record = getContentForType(typeName).get(uid); if(record == null) { return null; } // this repeated unpacking is a little inefficient - subclass RecordInfo to hold unpacked form too? // not too much of an issue as log reads are done for recovery only. try { InputBuffer inputBuffer = new InputBuffer(record.data); Uid unpackedUid = UidHelper.unpackFrom(inputBuffer); String unpackedTypeName = inputBuffer.unpackString(); InputObjectState inputObjectState = new InputObjectState(uid, typeName, inputBuffer.unpackBytes()); return inputObjectState; } catch(Exception e) { throw new ObjectStoreException(e); } }
/** * Read the object's committed state. * * @param uid The object to work on. * @param typeName The type of the object to work on. * @return the state of the object. * @throws ObjectStoreException if things go wrong. */ public InputObjectState read_committed(Uid uid, String typeName) throws ObjectStoreException { RecordInfo record = getContentForType(typeName).get(uid); if(record == null) { return null; } // this repeated unpacking is a little inefficient - subclass RecordInfo to hold unpacked form too? // not too much of an issue as log reads are done for recovery only. try { InputBuffer inputBuffer = new InputBuffer(record.data); UidHelper.unpackFrom(inputBuffer); inputBuffer.unpackString(); return new InputObjectState(uid, typeName, inputBuffer.unpackBytes()); } catch(Exception e) { throw new ObjectStoreException(e); } }
/** * Read the object's committed state. * * @param uid The object to work on. * @param typeName The type of the object to work on. * @return the state of the object. * @throws ObjectStoreException if things go wrong. */ public InputObjectState read_committed(Uid uid, String typeName) throws ObjectStoreException { RecordInfo record = getContentForType(typeName).get(uid); if(record == null) { return null; } // this repeated unpacking is a little inefficient - subclass RecordInfo to hold unpacked form too? // not too much of an issue as log reads are done for recovery only. try { InputBuffer inputBuffer = new InputBuffer(record.data); UidHelper.unpackFrom(inputBuffer); inputBuffer.unpackString(); return new InputObjectState(uid, typeName, inputBuffer.unpackBytes()); } catch(Exception e) { throw new ObjectStoreException(e); } }
/** * Read the object's committed state. * * @param uid The object to work on. * @param typeName The type of the object to work on. * @return the state of the object. * @throws ObjectStoreException if things go wrong. */ public InputObjectState read_committed(Uid uid, String typeName) throws ObjectStoreException { RecordInfo record = getContentForType(typeName).get(uid); if(record == null) { return null; } // this repeated unpacking is a little inefficient - subclass RecordInfo to hold unpacked form too? // not too much of an issue as log reads are done for recovery only. try { InputBuffer inputBuffer = new InputBuffer(record.data); Uid unpackedUid = UidHelper.unpackFrom(inputBuffer); String unpackedTypeName = inputBuffer.unpackString(); InputObjectState inputObjectState = new InputObjectState(uid, typeName, inputBuffer.unpackBytes()); return inputObjectState; } catch(Exception e) { throw new ObjectStoreException(e); } }
/** * Read the object's committed state. * * @param uid The object to work on. * @param typeName The type of the object to work on. * @return the state of the object. * @throws ObjectStoreException if things go wrong. */ public InputObjectState read_committed(Uid uid, String typeName) throws ObjectStoreException { RecordInfo record = getContentForType(typeName).get(uid); if(record == null) { return null; } // this repeated unpacking is a little inefficient - subclass RecordInfo to hold unpacked form too? // not too much of an issue as log reads are done for recovery only. try { InputBuffer inputBuffer = new InputBuffer(record.data); UidHelper.unpackFrom(inputBuffer); inputBuffer.unpackString(); return new InputObjectState(uid, typeName, inputBuffer.unpackBytes()); } catch(Exception e) { throw new ObjectStoreException(e); } }
/** * Read the object's committed state. * * @param uid The object to work on. * @param typeName The type of the object to work on. * @return the state of the object. * @throws ObjectStoreException if things go wrong. */ public InputObjectState read_committed(Uid uid, String typeName) throws ObjectStoreException { RecordInfo record = getContentForType(typeName).get(uid); if(record == null) { return null; } // this repeated unpacking is a little inefficient - subclass RecordInfo to hold unpacked form too? // not too much of an issue as log reads are done for recovery only. try { InputBuffer inputBuffer = new InputBuffer(record.data); UidHelper.unpackFrom(inputBuffer); inputBuffer.unpackString(); return new InputObjectState(uid, typeName, inputBuffer.unpackBytes()); } catch(Exception e) { throw new ObjectStoreException(e); } }
/** * Read the object's committed state. * * @param uid The object to work on. * @param typeName The type of the object to work on. * @return the state of the object. * @throws ObjectStoreException if things go wrong. */ public InputObjectState read_committed(Uid uid, String typeName) throws ObjectStoreException { RecordInfo record = getContentForType(typeName).get(uid); if(record == null) { return null; } // this repeated unpacking is a little inefficient - subclass RecordInfo to hold unpacked form too? // not too much of an issue as log reads are done for recovery only. try { InputBuffer inputBuffer = new InputBuffer(record.data); UidHelper.unpackFrom(inputBuffer); inputBuffer.unpackString(); return new InputObjectState(uid, typeName, inputBuffer.unpackBytes()); } catch(Exception e) { throw new ObjectStoreException(e); } }
/** * Read the object's committed state. * * @param uid The object to work on. * @param typeName The type of the object to work on. * @return the state of the object. * @throws ObjectStoreException if things go wrong. */ public InputObjectState read_committed(Uid uid, String typeName) throws ObjectStoreException { RecordInfo record = getContentForType(typeName).get(uid); if(record == null) { return null; } // this repeated unpacking is a little inefficient - subclass RecordInfo to hold unpacked form too? // not too much of an issue as log reads are done for recovery only. try { InputBuffer inputBuffer = new InputBuffer(record.data); Uid unpackedUid = UidHelper.unpackFrom(inputBuffer); String unpackedTypeName = inputBuffer.unpackString(); InputObjectState inputObjectState = new InputObjectState(uid, typeName, inputBuffer.unpackBytes()); return inputObjectState; } catch(Exception e) { throw new ObjectStoreException(e); } }