Refine search
/** * @param u The object to query. * @param tn The type of the object to query. * @return the current state of the object's state (e.g., shadowed, * committed ...) */ public int currentState(Uid u, String tn) throws ObjectStoreException { if (tsLogger.logger.isTraceEnabled()) { tsLogger.logger.trace("VolatileStore.currentState(Uid=" + u + ", typeName=" + tn + ")"); } return getState(u); }
/** * Read the object's committed state. * * @param u The object to work on. * @param tn The type of the object to work on. * @return the state of the object. */ public InputObjectState read_committed(Uid u, String tn) throws ObjectStoreException { if (tsLogger.logger.isTraceEnabled()) { tsLogger.logger.trace("VolatileStore.read_committed(Uid=" + u + ", typeName=" + tn + ")"); } return read(u, tn, StateStatus.OS_COMMITTED); }
/** * Remove the object's committed state. * * @param u The object to work on. * @param tn The type of the object to work on. * @return <code>true</code> if no errors occurred, <code>false</code> * otherwise. */ public boolean remove_committed(Uid u, String tn) throws ObjectStoreException { if (tsLogger.logger.isTraceEnabled()) { tsLogger.logger.trace("VolatileStore.remove_committed(Uid=" + u + ", typeName=" + tn + ")"); } return remove(u, tn, StateStatus.OS_COMMITTED); }
/** * Write a new copy of the object's committed state. * * @param u The object to work on. * @param tn The type of the object to work on. * @param buff The state to write. * @return <code>true</code> if no errors occurred, <code>false</code> * otherwise. */ public boolean write_committed(Uid u, String tn, OutputObjectState buff) throws ObjectStoreException { if (tsLogger.logger.isTraceEnabled()) { tsLogger.logger.trace("VolatileStore.write_committed(Uid=" + u + ", typeName=" + tn + ")"); } if (write(u, tn, buff, StateStatus.OS_COMMITTED)) { if (stateTypes != null) addUidMapping(u, tn); return true; } return false; }
/** * 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 (store == null) throw new ObjectStoreException("Operation not supported by this implementation"); return store.allTypes(buff); }
/** * 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 (store == null) throw new ObjectStoreException("Operation not supported by this implementation"); return store.allObjUids(s, buff, m); }
/** * 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; }
/** * 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; }
/** * Write a new copy of the object's committed state. * * @param u The object to work on. * @param tn The type of the object to work on. * @param buff The state to write. * @return <code>true</code> if no errors occurred, <code>false</code> * otherwise. */ public boolean write_committed(Uid u, String tn, OutputObjectState buff) throws ObjectStoreException { if (tsLogger.logger.isTraceEnabled()) { tsLogger.logger.trace("VolatileStore.write_committed(Uid=" + u + ", typeName=" + tn + ")"); } return write(u, tn, buff, StateStatus.OS_COMMITTED); }
public TwoPhaseVolatileStore(ObjectStoreEnvironmentBean objectStoreEnvironmentBean) throws ObjectStoreException { super(objectStoreEnvironmentBean); if (objectStoreEnvironmentBean.isVolatileStoreSupportAllObjUids()) store = new VolatileStore(objectStoreEnvironmentBean); }
/** * 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 (store == null) throw new ObjectStoreException("Operation not supported by this implementation"); return store.allTypes(buff); }
/** * 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 (store == null) throw new ObjectStoreException("Operation not supported by this implementation"); return store.allObjUids(s, buff, m); }
/** * 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; }
/** * 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; }
/** * Write a new copy of the object's committed state. * * @param u The object to work on. * @param tn The type of the object to work on. * @param buff The state to write. * @return <code>true</code> if no errors occurred, <code>false</code> * otherwise. */ public boolean write_committed(Uid u, String tn, OutputObjectState buff) throws ObjectStoreException { if (tsLogger.logger.isTraceEnabled()) { tsLogger.logger.trace("VolatileStore.write_committed(Uid=" + u + ", typeName=" + tn + ")"); } if (write(u, tn, buff, StateStatus.OS_COMMITTED)) { if (stateTypes != null) addUidMapping(u, tn); return true; } return false; }
/** * Write a new copy of the object's committed state. * * @param u The object to work on. * @param tn The type of the object to work on. * @param buff The state to write. * @return <code>true</code> if no errors occurred, <code>false</code> * otherwise. */ public boolean write_committed(Uid u, String tn, OutputObjectState buff) throws ObjectStoreException { if (tsLogger.logger.isTraceEnabled()) { tsLogger.logger.trace("VolatileStore.write_committed(Uid=" + u + ", typeName=" + tn + ")"); } return write(u, tn, buff, StateStatus.OS_COMMITTED); }
public TwoPhaseVolatileStore(ObjectStoreEnvironmentBean objectStoreEnvironmentBean) throws ObjectStoreException { super(objectStoreEnvironmentBean); if (objectStoreEnvironmentBean.isVolatileStoreSupportAllObjUids()) store = new VolatileStore(objectStoreEnvironmentBean); }
/** * 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 (store == null) throw new ObjectStoreException("Operation not supported by this implementation"); return store.allTypes(buff); }