com.threerings.cast.bundle.tools
Class ComponentBundlerTask.HashMapIDBroker
java.lang.Object
java.util.AbstractMap<K,V>
java.util.HashMap<Tuple<String,String>,Integer>
com.threerings.cast.bundle.tools.ComponentBundlerTask.HashMapIDBroker
- All Implemented Interfaces:
- ComponentIDBroker, Serializable, Cloneable, Map<Tuple<String,String>,Integer>
- Enclosing class:
- ComponentBundlerTask
protected static class ComponentBundlerTask.HashMapIDBroker
- extends HashMap<Tuple<String,String>,Integer>
- implements ComponentIDBroker
- See Also:
- Serialized Form
| Methods inherited from class java.util.HashMap |
clear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, size, values |
_nextCID
protected int _nextCID
_startCID
protected int _startCID
ComponentBundlerTask.HashMapIDBroker
protected ComponentBundlerTask.HashMapIDBroker()
getComponentID
public int getComponentID(String cclass,
String cname)
throws PersistenceException
- Description copied from interface:
ComponentIDBroker
- Returns the unique identifier for the named component. If no
identifier has yet been assigned to the specified named component,
one should be assigned and returned.
- Specified by:
getComponentID in interface ComponentIDBroker
- Parameters:
cclass - the name of the class to which the component belongs.cname - the name of the component.
- Throws:
PersistenceException - thrown if an error occurs
communicating with the underlying persistence mechanism used to
store the name to id mappings.
commit
public void commit()
throws PersistenceException
- Description copied from interface:
ComponentIDBroker
- When the user of a component id broker is done obtaining component
ids, it must call this method to give the component id broker an
opportunity to flush any newly created component ids back to its
persistent store.
- Specified by:
commit in interface ComponentIDBroker
- Throws:
PersistenceException
isModified
public boolean isModified()
writeTo
public void writeTo(BufferedWriter bout)
throws IOException
- Throws:
IOException
readFrom
public void readFrom(BufferedReader bin)
throws IOException
- Throws:
IOException
readInt
protected int readInt(BufferedReader bin)
throws IOException
- Throws:
IOException