Overview | Package | Class | Tree | Deprecated | Index | Help
| Hyperic HQ Plugin API v. 4.4.0.2
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.hyperic.hq.measurement.server.session
Class AvailabilityCache

    java.lang.Object
      org.hyperic.hq.measurement.server.session.AvailabilityCache

    public class AvailabilityCache

extends java.lang.Object

Dynamic EhCache that is allowed to grow over time as needed. AvailabilityCache should only be used in AvailabilityManager.addData() OR Backfiller operations. In big environments it will be very contentious and due to its nature may not have the data being sought at any given time. Use AvailabilityManager.getLastAvail().

Method Summary
`boolean` | `beginTran()`
`void` | `commitTran()`
`DataPoint` | `get(java.lang.Integer id)` Get a DataPoint from the cache based on the Measurement id.
`DataPoint` | `get(java.lang.Integer id, DataPoint defaultState)` Get a DataPoint from the cache based on Measurement id
`static AvailabilityCache` | `getInstance()` DO NOT USE THIS unless it is to maintain Availability RLE state as in AvailabilityManager.addData() OR Backfiller operations!!! Use `AvailabilityManager.getLastAvail`
`void` | `put(java.lang.Integer id, DataPoint state)` Put an item into the cache.
`void` | `rollbackTran()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### getInstance

    public static AvailabilityCache getInstance()

  DO NOT USE THIS unless it is to maintain Availability RLE state as in AvailabilityManager.addData() OR Backfiller operations!!! Use `AvailabilityManager.getLastAvail`

  Returns:
    The singleton instance of the AvailabilityCache.

### rollbackTran

    public void rollbackTran()

### commitTran

    public void commitTran()

### beginTran

    public boolean beginTran()

  Returns:
    true if a new cache transaction was started, false if the currentThread was already participating in the current transaction

### get

    public DataPoint get(java.lang.Integer id,
                         DataPoint defaultState)

  Get a DataPoint from the cache based on Measurement id

  Parameters:
    `id` - The Measurement id in question.
  Returns:
    The DataPoint or the defaultState if the Measurement id is not located in the cache.

### get

    public DataPoint get(java.lang.Integer id)

  Get a DataPoint from the cache based on the Measurement id.

  Parameters:
    `id` - The Measurement id in question.
  Returns:
    The DataPoint or null if it does not exist in the cache.

### put

    public void put(java.lang.Integer id,
                    DataPoint state)

  Put an item into the cache.

  Parameters:
    `id` - The Measurement id representing the availability data point.
    `state` - The DataPoint to store for the given id.

Overview | Package | Class | Tree | Deprecated | Index | Help
| Hyperic HQ Plugin API v. 4.4.0.2
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2004-2006 Hyperic, Inc. support@hyperic.net, All Rights Reserved.