|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.sourcejammer.util.CounterFactory
Title: $FileName: CounterFactory.java$
Field Summary | |
private java.io.File |
counterFile
|
private static java.util.Hashtable |
counters
A cache of counter objects. |
private long |
value
|
Constructor Summary | |
private |
CounterFactory(java.io.File counterFile)
Constructs the CounterFactory from the specified file. If the file is not found, this method attempts to create it. If the file found is a Counter object, this method attempts to read the Counter object and convert it to a CounterFactory. |
Method Summary | |
private long |
getNextValue()
|
static long |
getNextValue(java.io.File counterFile)
Returns the next id of the counter stored at the specified location. |
static void |
main(java.lang.String[] args)
|
private static long |
oldCounterNextID(java.io.File fl)
|
private long |
readLongValue()
Reads the value from the file. |
private void |
saveValue()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static java.util.Hashtable counters
private java.io.File counterFile
private long value
Constructor Detail |
private CounterFactory(java.io.File counterFile) throws java.io.IOException
Method Detail |
private long getNextValue() throws java.io.IOException
java.io.IOException
private void saveValue() throws java.io.IOException
java.io.IOException
private long readLongValue() throws java.io.FileNotFoundException, java.io.IOException, java.lang.ClassNotFoundException
java.io.FileNotFoundException
java.io.IOException
java.lang.ClassNotFoundException
public static long getNextValue(java.io.File counterFile) throws java.io.IOException
java.io.IOException
public static void main(java.lang.String[] args)
private static long oldCounterNextID(java.io.File fl) throws java.io.IOException
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |