java.lang.Object
org.rrd4j.core.RrdDbPool.RrdEntry
Enclosing class:
RrdDbPool

private static class RrdDbPool.RrdEntryextends Object
One pooled database with its usage state.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    (package private) int
    Open requests against this entry.
    (package private) final ReentrantReadWriteLock
    Lock guarding the entry's use.
    (package private) final Lock
    Convenience view of the write lock.
    (package private) final boolean
    True if the entry only reserves the key.
    (package private) RrdDb
    The pooled database, null while a placeholder.
    (package private) final URI
    The canonical URI this entry holds.
    (package private) final CountDownLatch
    Latch signaled when the entry becomes empty.
  • Constructor Summary

    Constructors
    Constructor
    Description
    RrdEntry(URI canonicalPath)
    Builds an entry for one URI.
    Builds a placeholder copying the parent's state.
  • Method Summary

    All Methods
    Modifier and Type
    Method
    Description
    Formats the uri, adding the count and db only when not a placeholder.

    Methods inherited from class Object

    clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • rrdDb

      RrdDb rrdDb
      The pooled database, null while a placeholder.
    • count

      int count
      Open requests against this entry.
    • waitempty

      final CountDownLatch waitempty
      Latch signaled when the entry becomes empty.
    • inuse

      Lock guarding the entry's use.
    • lock

      final Lock lock
      Convenience view of the write lock.
    • placeholder

      final boolean placeholder
      True if the entry only reserves the key.
    • uri

      final URI uri
      The canonical URI this entry holds.
  • Constructor Details

    • RrdEntry

      RrdEntry(URI canonicalPath)
      Builds an entry for one URI.
      Parameters:
      canonicalPath - the canonical URI to hold
    • RrdEntry

      RrdEntry(RrdDbPool.RrdEntry parent)
      Builds a placeholder copying the parent's state.
      Parameters:
      parent - the entry to copy locks from
  • Method Details

    • toString

      public String toString()
      Formats the uri, adding the count and db only when not a placeholder.
      Overrides:
      toString in class Object