org.modeshape.jcr.cache

## Class ReferrerCounts.MutableReferrerCounts

- java.lang.Object
- - org.modeshape.jcr.cache.ReferrerCounts.MutableReferrerCounts

- Enclosing class:
    ReferrerCounts

      public static final class ReferrerCounts.MutableReferrerCounts
      extends Object

- - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `ReferrerCounts.MutableReferrerCounts(ReferrerCounts counts)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `ReferrerCounts.MutableReferrerCounts` | `addStrong(NodeKey key, int increment)` Add the specified number of strong reference counts for the given key.
    `ReferrerCounts.MutableReferrerCounts` | `addWeak(NodeKey key, int increment)` Add the specified number of weak reference counts for the given key.
    `ReferrerCounts` | `freeze()` Freeze this mutable object and create a new immutable `ReferrerCounts`.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ReferrerCounts.MutableReferrerCounts

          protected ReferrerCounts.MutableReferrerCounts(ReferrerCounts counts)

  - ### Method Detail

    - #### addStrong

          public ReferrerCounts.MutableReferrerCounts addStrong(NodeKey key,
                                                       int increment)

      Add the specified number of strong reference counts for the given key.
      Parameters:
        `key` - the referring node key
        `increment` - the number to increase; may be negative to decrease
      Returns:
        this object for chaining method calls; never null

    - #### addWeak

          public ReferrerCounts.MutableReferrerCounts addWeak(NodeKey key,
                                                     int increment)

      Add the specified number of weak reference counts for the given key.
      Parameters:
        `key` - the referring node key
        `increment` - the number to increase; may be negative to decrease
      Returns:
        this object for chaining method calls; never null

    - #### freeze

          public ReferrerCounts freeze()

      Freeze this mutable object and create a new immutable `ReferrerCounts`.
      Returns:
        the immutable counts snapshot; null if there are no referrers

Copyright © 2008-2014 JBoss, a division of Red Hat. All Rights Reserved.