public byte[] getRecoveryState() throws Exception { OutputObjectState oos = new OutputObjectState(); oos.packString(this.getClass().getName()); this.saveState(oos); return oos.buffer(); }
boolean removeState(Uid u, String tn, int s) throws ObjectStoreException { try { OutputObjectState removalState = new OutputObjectState(u, tn); removalState.packBytes(_removedState); if (!write_state(u, tn, removalState, s)) throw new ObjectStoreException(); } catch (IOException ex) { throw new ObjectStoreException(ex.toString(), ex); } return true; }
/** * Obtain all of the Uids for a specified type. * * @param s The type to scan for. * @param buff The object state in which to store the Uids * @param m The file type to look for (e.g., committed, shadowed). * @return <code>true</code> if no errors occurred, <code>false</code> * otherwise. */ public boolean allObjUids(String s, InputObjectState buff, int m) throws ObjectStoreException { if (stateTypes == null) throw new ObjectStoreException("Operation not supported by this implementation"); OutputObjectState store = new OutputObjectState(); for (Map.Entry<Uid, String> entry : stateTypes.entrySet()) if (entry.getValue().equals(s)) packUid(store, entry.getKey()); packUid(store, Uid.nullUid()); buff.setBuffer(store.buffer()); return true; }
public boolean allTypes(InputObjectState foundTypes) throws ObjectStoreException if(tsLogger.logger.isTraceEnabled()) { tsLogger.logger.trace("HornetqObjectStore.allTypes()"); return true; OutputObjectState buffer = new OutputObjectState(); throw new ObjectStoreException(e); foundTypes.setBuffer(buffer.buffer());
public boolean restore_state (InputObjectState os, int ot) if (tsLogger.logger.isTraceEnabled()) { tsLogger.logger.trace("PersistenceRecord::restore_state() for " + order()); topLevelState = new OutputObjectState(os); res = topLevelState.valid();
public final InputObjectState allObjUids () throws ObjectStoreException { OutputObjectState state = new OutputObjectState(); Iterator<Uid> iter = _ids.keySet().iterator(); try { while (iter.hasNext()) { UidHelper.packInto(iter.next(), state); } // don't forget to null terminate UidHelper.packInto(Uid.nullUid(), state); } catch (final IOException ex) { throw new ObjectStoreException(ex); } return new InputObjectState(state); }
public OutputObjectState getOOS() { if (getBuff() == null || getBuff().length == 0) return null; Uid u = getNewUid() == null ? Uid.nullUid() : getNewUid(); String t = gettName() == null ? "" : gettName(); byte[] b = getBuff() == null ? new byte[0] : getBuff(); return new OutputObjectState(u, t, b); }
OutputObjectState store = new OutputObjectState(); foundTypes.setBuffer(store.buffer()); return true; } catch (Exception e) {
public boolean allTypes(InputObjectState foundTypes) throws ObjectStoreException if(tsLogger.logger.isTraceEnabled()) { tsLogger.logger.trace("HornetqObjectStore.allTypes()"); return true; OutputObjectState buffer = new OutputObjectState(); throw new ObjectStoreException(e); foundTypes.setBuffer(buffer.buffer());
public boolean restore_state (InputObjectState os, int ot) if (tsLogger.logger.isTraceEnabled()) { tsLogger.logger.trace("PersistenceRecord::restore_state() for " + order()); topLevelState = new OutputObjectState(os); res = topLevelState.valid();
/** * Obtain all of the Uids for a specified type. * * @param s The type to scan for. * @param buff The object state in which to store the Uids * @param m The file type to look for (e.g., committed, shadowed). * @return <code>true</code> if no errors occurred, <code>false</code> * otherwise. */ public boolean allObjUids(String s, InputObjectState buff, int m) throws ObjectStoreException { if (stateTypes == null) throw new ObjectStoreException("Operation not supported by this implementation"); OutputObjectState store = new OutputObjectState(); for (Map.Entry<Uid, String> entry : stateTypes.entrySet()) if (entry.getValue().equals(s)) packUid(store, entry.getKey()); packUid(store, Uid.nullUid()); buff.setBuffer(store.buffer()); return true; }
public final InputObjectState allObjUids () throws ObjectStoreException { OutputObjectState state = new OutputObjectState(); Iterator<Uid> iter = _ids.keySet().iterator(); try { while (iter.hasNext()) { UidHelper.packInto(iter.next(), state); } // don't forget to null terminate UidHelper.packInto(Uid.nullUid(), state); } catch (final IOException ex) { throw new ObjectStoreException(ex); } return new InputObjectState(state); }
public OutputObjectState getOOS() { if (getBuff() == null || getBuff().length == 0) return null; Uid u = getNewUid() == null ? Uid.nullUid() : getNewUid(); String t = gettName() == null ? "" : gettName(); byte[] b = getBuff() == null ? new byte[0] : getBuff(); return new OutputObjectState(u, t, b); }
boolean removeState(Uid u, String tn, int s) throws ObjectStoreException { try { OutputObjectState removalState = new OutputObjectState(u, tn); removalState.packBytes(_removedState); if (!write_state(u, tn, removalState, s)) throw new ObjectStoreException(); } catch (IOException ex) { throw new ObjectStoreException(ex.toString(), ex); } return true; }
public byte[] getRecoveryState() throws Exception { OutputObjectState oos = new OutputObjectState(); oos.packString(this.getClass().getName()); this.saveState(oos); return oos.buffer(); }
OutputObjectState store = new OutputObjectState(); foundTypes.setBuffer(store.buffer()); return true; } catch (Exception e) {
public boolean allTypes(InputObjectState foundTypes) throws ObjectStoreException if(tsLogger.logger.isTraceEnabled()) { tsLogger.logger.trace("HornetqObjectStore.allTypes()"); return true; OutputObjectState buffer = new OutputObjectState(); throw new ObjectStoreException(e); foundTypes.setBuffer(buffer.buffer());
public boolean restore_state (InputObjectState os, int ot) if (tsLogger.logger.isTraceEnabled()) { tsLogger.logger.trace("PersistenceRecord::restore_state() for " + order()); topLevelState = new OutputObjectState(os); res = topLevelState.valid();
/** * Obtain all of the Uids for a specified type. * * @param s The type to scan for. * @param buff The object state in which to store the Uids * @param m The file type to look for (e.g., committed, shadowed). * @return <code>true</code> if no errors occurred, <code>false</code> * otherwise. */ public boolean allObjUids(String s, InputObjectState buff, int m) throws ObjectStoreException { if (stateTypes == null) throw new ObjectStoreException("Operation not supported by this implementation"); OutputObjectState store = new OutputObjectState(); for (Map.Entry<Uid, String> entry : stateTypes.entrySet()) if (entry.getValue().equals(s)) packUid(store, entry.getKey()); packUid(store, Uid.nullUid()); buff.setBuffer(store.buffer()); return true; }
public final InputObjectState allObjUids () throws ObjectStoreException { OutputObjectState state = new OutputObjectState(); Iterator<Uid> iter = _ids.keySet().iterator(); try { while (iter.hasNext()) { UidHelper.packInto(iter.next(), state); } // don't forget to null terminate UidHelper.packInto(Uid.nullUid(), state); } catch (final IOException ex) { throw new ObjectStoreException(ex); } return new InputObjectState(state); }