scala.xml.persistent

CachedFileStorage

abstract 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.

Source
CachedFileStorage.scala
Linear Supertypes
Logged, Thread, Runnable, AnyRef, Any
Known Subclasses
Type Hierarchy Learn more about scaladoc diagrams
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. CachedFileStorage
  2. Logged
  3. Thread
  4. Runnable
  5. AnyRef
  6. Any
Implicitly
  1. by StringAdd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new CachedFileStorage(file1: File)

Abstract Value Members

  1. abstract def +=(e: Node): Unit

    adds a node, setting this.

    adds a node, setting this.dirty to true as a side effect

  2. abstract def -=(e: Node): Unit

    removes a tree, setting this.

    removes a tree, setting this.dirty to true as a side effect

  3. abstract def nodes: collection.Iterator[Node]

    returns an iterator over the nodes in this storage

Concrete Value Members

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

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. def +(other: String): String

    Implicit information
    This member is added by an implicit conversion from CachedFileStorage to StringAdd[CachedFileStorage] performed by method StringAdd in scala.Predef.
    Definition Classes
    StringAdd
  5. def ->[B](y: B): (CachedFileStorage, B)

    Implicit information
    This member is added by an implicit conversion from CachedFileStorage to ArrowAssoc[CachedFileStorage] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  6. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  7. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  8. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  9. final def checkAccess(): Unit

    Definition Classes
    Thread
  10. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    Thread → AnyRef
    Annotations
    @throws()
  11. var dirty: Boolean

    this storage modified since last modification check

    this storage modified since last modification check

    Attributes
    protected
  12. def ensuring(cond: (CachedFileStorage) ⇒ Boolean, msg: ⇒ Any): CachedFileStorage

    Implicit information
    This member is added by an implicit conversion from CachedFileStorage to Ensuring[CachedFileStorage] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  13. def ensuring(cond: (CachedFileStorage) ⇒ Boolean): CachedFileStorage

    Implicit information
    This member is added by an implicit conversion from CachedFileStorage to Ensuring[CachedFileStorage] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  14. def ensuring(cond: Boolean, msg: ⇒ Any): CachedFileStorage

    Implicit information
    This member is added by an implicit conversion from CachedFileStorage to Ensuring[CachedFileStorage] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  15. def ensuring(cond: Boolean): CachedFileStorage

    Implicit information
    This member is added by an implicit conversion from CachedFileStorage to Ensuring[CachedFileStorage] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  16. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  17. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  18. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  19. def flush(): Unit

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

  20. def formatted(fmtstr: String): String

    Returns string formatted according to given format string.

    Returns string formatted according to given format string. Format strings are as for String.format (@see java.lang.String.format).

    Implicit information
    This member is added by an implicit conversion from CachedFileStorage to StringFormat[CachedFileStorage] performed by method StringFormat in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @inline()
  21. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  22. def getContextClassLoader(): ClassLoader

    Definition Classes
    Thread
  23. def getId(): Long

    Definition Classes
    Thread
  24. final def getName(): String

    Definition Classes
    Thread
  25. final def getPriority(): Int

    Definition Classes
    Thread
  26. def getStackTrace(): Array[StackTraceElement]

    Definition Classes
    Thread
  27. def getState(): State

    Definition Classes
    Thread
  28. final def getThreadGroup(): ThreadGroup

    Definition Classes
    Thread
  29. def getUncaughtExceptionHandler(): UncaughtExceptionHandler

    Definition Classes
    Thread
  30. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  31. def initialNodes: collection.Iterator[Node]

    finds and loads the storage file.

    finds and loads the storage file. subclasses should call this method prior to any other, but only once, to obtain the initial sequence of nodes.

    Attributes
    protected
  32. def interrupt(): Unit

    Definition Classes
    Thread
  33. val interval: Int

    period between modification checks, in milliseconds

    period between modification checks, in milliseconds

    Attributes
    protected
  34. final def isAlive(): Boolean

    Definition Classes
    Thread
  35. final def isDaemon(): Boolean

    Definition Classes
    Thread
  36. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  37. def isInterrupted(): Boolean

    Definition Classes
    Thread
  38. final def join(): Unit

    Definition Classes
    Thread
    Annotations
    @throws()
  39. final def join(arg0: Long, arg1: Int): Unit

    Definition Classes
    Thread
    Annotations
    @throws()
  40. final def join(arg0: Long): Unit

    Definition Classes
    Thread
    Annotations
    @throws()
  41. def log(msg: String): Unit

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

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

    msg

    message to be logged

    Definition Classes
    Logged
  42. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  43. final def notify(): Unit

    Definition Classes
    AnyRef
  44. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  45. def run(): Unit

    Run method of the thread.

    Run method of the thread. remember to use start() to start a thread, not run.

    Definition Classes
    CachedFileStorage → Thread → Runnable
  46. def setContextClassLoader(arg0: ClassLoader): Unit

    Definition Classes
    Thread
  47. final def setDaemon(arg0: Boolean): Unit

    Definition Classes
    Thread
  48. final def setName(arg0: String): Unit

    Definition Classes
    Thread
  49. final def setPriority(arg0: Int): Unit

    Definition Classes
    Thread
  50. def setUncaughtExceptionHandler(arg0: UncaughtExceptionHandler): Unit

    Definition Classes
    Thread
  51. def start(): Unit

    Definition Classes
    Thread
  52. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  53. def toString(): String

    Definition Classes
    Thread → AnyRef → Any
  54. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()
  55. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()
  56. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()
  57. def [B](y: B): (CachedFileStorage, B)

    Implicit information
    This member is added by an implicit conversion from CachedFileStorage to ArrowAssoc[CachedFileStorage] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc

Deprecated Value Members

  1. def countStackFrames(): Int

    Definition Classes
    Thread
    Annotations
    @Deprecated @deprecated
    Deprecated

    (Since version ) see corresponding Javadoc for more information.

  2. def destroy(): Unit

    Definition Classes
    Thread
    Annotations
    @Deprecated @deprecated
    Deprecated

    (Since version ) see corresponding Javadoc for more information.

  3. final def resume(): Unit

    Definition Classes
    Thread
    Annotations
    @Deprecated @deprecated
    Deprecated

    (Since version ) see corresponding Javadoc for more information.

  4. final def stop(arg0: java.lang.Throwable): Unit

    Definition Classes
    Thread
    Annotations
    @Deprecated @deprecated
    Deprecated

    (Since version ) see corresponding Javadoc for more information.

  5. final def stop(): Unit

    Definition Classes
    Thread
    Annotations
    @Deprecated @deprecated
    Deprecated

    (Since version ) see corresponding Javadoc for more information.

  6. final def suspend(): Unit

    Definition Classes
    Thread
    Annotations
    @Deprecated @deprecated
    Deprecated

    (Since version ) see corresponding Javadoc for more information.

Inherited from Logged

Inherited from Thread

Inherited from Runnable

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion StringAdd from CachedFileStorage to StringAdd[CachedFileStorage]

Inherited by implicit conversion StringFormat from CachedFileStorage to StringFormat[CachedFileStorage]

Inherited by implicit conversion Ensuring from CachedFileStorage to Ensuring[CachedFileStorage]

Inherited by implicit conversion ArrowAssoc from CachedFileStorage to ArrowAssoc[CachedFileStorage]

Ungrouped