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; }
/** * Can only be called after the first phase has executed * * @param xid * @return */ public synchronized boolean wasCommitted(String jndiName, Xid xid) throws ObjectStoreException { if (!queriedResourceManagers.contains(jndiName) || committedXidsToJndiNames.get(xid) == null) { periodicWorkFirstPass(); } if (!queriedResourceManagers.contains(jndiName)) { throw new ObjectStoreException(jndiName + " was not online"); } String committed = committedXidsToJndiNames.get(xid); if (tsLogger.logger.isTraceEnabled()) { tsLogger.logger.trace("wasCommitted" + xid + " " + committed); } return committed != null; }
/** * Obtain all types of objects stored in the object store. * * @param buff The state in which to store the types. * @return <code>true</code> if no errors occurred, <code>false</code> * otherwise. */ public boolean allTypes(InputObjectState buff) throws ObjectStoreException { if (stateTypes == null) throw new ObjectStoreException("Operation not supported by this implementation"); Set<String> types = new HashSet<>(stateTypes.values()); OutputObjectState store = new OutputObjectState(); for (String type : types) packString(store, type); packString(store, ""); 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());
UidHelper.packInto(uid, outputBuffer); outputBuffer.packString(typeName); outputBuffer.packBytes(txData.buffer()); byte[] data = outputBuffer.buffer(); throw new ObjectStoreException(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());
/** * Can only be called after the first phase has executed * * @param xid * @throws ObjectStoreException if the resource manager was offline * @return whether the Xid was commited by the resource manager */ public synchronized boolean wasCommitted(String jndiName, Xid xid) throws ObjectStoreException { if (!queriedResourceManagers.contains(jndiName) || committedXidsToJndiNames.get(xid) == null) { periodicWorkFirstPass(); } if (!queriedResourceManagers.contains(jndiName)) { throw new ObjectStoreException(jndiName + " was not online"); } String committed = committedXidsToJndiNames.get(xid); if (tsLogger.logger.isTraceEnabled()) { tsLogger.logger.trace("wasCommitted" + xid + " " + committed); } return committed != null; }
/** * Obtain all types of objects stored in the object store. * * @param buff The state in which to store the types. * @return <code>true</code> if no errors occurred, <code>false</code> * otherwise. */ public boolean allTypes(InputObjectState buff) throws ObjectStoreException { if (stateTypes == null) throw new ObjectStoreException("Operation not supported by this implementation"); Set<String> types = new HashSet<>(stateTypes.values()); OutputObjectState store = new OutputObjectState(); for (String type : types) packString(store, type); packString(store, ""); buff.setBuffer(store.buffer()); return true; }
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; }
UidHelper.packInto(uid, outputBuffer); outputBuffer.packString(typeName); outputBuffer.packBytes(txData.buffer()); byte[] data = outputBuffer.buffer(); throw new ObjectStoreException(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());
/** * Can only be called after the first phase has executed * * @param xid * @throws ObjectStoreException if the resource manager was offline * @return whether the Xid was commited by the resource manager */ public synchronized boolean wasCommitted(String jndiName, Xid xid) throws ObjectStoreException { if (!queriedResourceManagers.contains(jndiName) || committedXidsToJndiNames.get(xid) == null) { periodicWorkFirstPass(); } if (!queriedResourceManagers.contains(jndiName)) { throw new ObjectStoreException(jndiName + " was not online"); } String committed = committedXidsToJndiNames.get(xid); if (tsLogger.logger.isTraceEnabled()) { tsLogger.logger.trace("wasCommitted" + xid + " " + committed); } return committed != null; }
/** * Obtain all types of objects stored in the object store. * * @param buff The state in which to store the types. * @return <code>true</code> if no errors occurred, <code>false</code> * otherwise. */ public boolean allTypes(InputObjectState buff) throws ObjectStoreException { if (stateTypes == null) throw new ObjectStoreException("Operation not supported by this implementation"); Set<String> types = new HashSet<>(stateTypes.values()); OutputObjectState store = new OutputObjectState(); for (String type : types) packString(store, type); packString(store, ""); buff.setBuffer(store.buffer()); return true; }
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; }
UidHelper.packInto(uid, outputBuffer); outputBuffer.packString(typeName); outputBuffer.packBytes(txData.buffer()); byte[] data = outputBuffer.buffer(); throw new ObjectStoreException(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());
/** * Can only be called after the first phase has executed * * @param xid * @throws ObjectStoreException if the resource manager was offline * @return whether the Xid was commited by the resource manager */ public synchronized boolean wasCommitted(String jndiName, Xid xid) throws ObjectStoreException { if (!queriedResourceManagers.contains(jndiName) || committedXidsToJndiNames.get(xid) == null) { periodicWorkFirstPass(); } if (!queriedResourceManagers.contains(jndiName)) { throw new ObjectStoreException(jndiName + " was not online"); } String committed = committedXidsToJndiNames.get(xid); if (tsLogger.logger.isTraceEnabled()) { tsLogger.logger.trace("wasCommitted" + xid + " " + committed); } return committed != null; }
/** * Obtain all types of objects stored in the object store. * * @param buff The state in which to store the types. * @return <code>true</code> if no errors occurred, <code>false</code> * otherwise. */ public boolean allTypes(InputObjectState buff) throws ObjectStoreException { if (stateTypes == null) throw new ObjectStoreException("Operation not supported by this implementation"); Set<String> types = new HashSet<>(stateTypes.values()); OutputObjectState store = new OutputObjectState(); for (String type : types) packString(store, type); packString(store, ""); buff.setBuffer(store.buffer()); return true; }
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; }
UidHelper.packInto(uid, outputBuffer); outputBuffer.packString(typeName); outputBuffer.packBytes(txData.buffer()); long id = getId(uid, typeName); byte[] data = outputBuffer.buffer(); getContentForType(typeName).put(uid, record); } catch(Exception e) { throw new ObjectStoreException(e);