scala.xml.persistent

CachedFileStorage

class CachedFileStorage extends Thread with Logged

Mutable storage of immutable xml trees. Everything is kept in memory, with a thread periodically checking for changes and writing to file. To ensure atomicity, two files are used, filename1 and '$'+filename1. The implementation switches between the two, deleting the older one after a complete dump of the database has been written.

attributes: abstract
known subclasses: SetStorage
source: CachedFileStorage.scala
    authors:
  1. Burak Emir

Inherited
  1. Hide All
  2. Show all
  1. Logged
  2. Thread
  3. Runnable
  4. AnyRef
  5. Any
Visibility
  1. Public
  2. All

Instance constructors

  1. new CachedFileStorage(file1: File)

Value Members

  1. def !=(arg0: AnyRef): Boolean

  2. def !=(arg0: Any): Boolean

    o != arg0 is the same as !(o == (arg0)).

  3. def ##(): Int

  4. def $asInstanceOf[T0](): T0

  5. def $isInstanceOf[T0](): Boolean

  6. def +=(e: Node): Unit

    adds a node, setting this.

  7. def -=(e: Node): Unit

    removes a tree, setting this.

  8. def ==(arg0: AnyRef): Boolean

    o == arg0 is the same as if (o eq null) arg0 eq null else o.equals(arg0).

  9. def ==(arg0: Any): Boolean

    o == arg0 is the same as o.equals(arg0).

  10. def asInstanceOf[T0]: T0

    This method is used to cast the receiver object to be of type T0.

  11. def checkAccess(): Unit

  12. def clone(): AnyRef

    This method creates and returns a copy of the receiver object.

  13. def countStackFrames(): Int

  14. def destroy(): Unit

  15. var dirty: Boolean

    this storage modified since last modification check

  16. def eq(arg0: AnyRef): Boolean

    This method is used to test whether the argument (arg0) is a reference to the receiver object (this).

  17. def equals(arg0: Any): Boolean

    This method is used to compare the receiver object (this) with the argument object (arg0) for equivalence.

  18. def finalize(): Unit

    This method is called by the garbage collector on the receiver object when garbage collection determines that there are no more references to the object.

  19. def flush: Unit

    forces writing of contents to the file, even if there has not been any update.

  20. def getClass(): java.lang.Class[_ <: java.lang.Object]

    Returns a representation that corresponds to the dynamic class of the receiver object.

  21. def getContextClassLoader(): ClassLoader

  22. def getId(): Long

  23. def getName(): String

  24. def getPriority(): Int

  25. def getStackTrace(): Array[StackTraceElement]

  26. def getState(): State

  27. def getThreadGroup(): ThreadGroup

  28. def getUncaughtExceptionHandler(): UncaughtExceptionHandler

  29. def hashCode(): Int

    Returns a hash code value for the object.

  30. def initialNodes: Iterator[Node]

    finds and loads the storage file.

  31. def interrupt(): Unit

  32. val interval: Int

    period between modification checks, in milliseconds

  33. def isAlive(): Boolean

  34. def isDaemon(): Boolean

  35. def isInstanceOf[T0]: Boolean

    This method is used to test whether the dynamic type of the receiver object is T0.

  36. def isInterrupted(): Boolean

  37. def join(): Unit

  38. def join(arg0: Long, arg1: Int): Unit

  39. def join(arg0: Long): Unit

  40. def log(msg: String): Unit

    This method should log the message given as argument somewhere as a side-effect.

  41. def ne(arg0: AnyRef): Boolean

    o.ne(arg0) is the same as !(o.eq(arg0)).

  42. def nodes: Iterator[Node]

    returns an iterator over the nodes in this storage

  43. def notify(): Unit

    Wakes up a single thread that is waiting on the receiver object's monitor.

  44. def notifyAll(): Unit

    Wakes up all threads that are waiting on the receiver object's monitor.

  45. def resume(): Unit

  46. def run(): Unit

    run method of the thread.

  47. def setContextClassLoader(arg0: ClassLoader): Unit

  48. def setDaemon(arg0: Boolean): Unit

  49. def setName(arg0: String): Unit

  50. def setPriority(arg0: Int): Unit

  51. def setUncaughtExceptionHandler(arg0: UncaughtExceptionHandler): Unit

  52. def start(): Unit

  53. def stop(arg0: Throwable): Unit

  54. def stop(): Unit

  55. def suspend(): Unit

  56. def synchronized[T0](arg0: T0): T0

  57. def toString(): String

    Returns a string representation of the object.

  58. def wait(): Unit

  59. def wait(arg0: Long, arg1: Int): Unit

  60. def wait(arg0: Long): Unit