Overview | Package | Class | Deprecated | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.exist.collections
Class CollectionCache

    java.lang.Object
      org.exist.storage.cache.GClockCache
          org.exist.storage.cache.LRDCache
              org.exist.collections.CollectionCache

All Implemented Interfaces:
  Cache

public class CollectionCache
extends LRDCache

Global cache for `Collection` objects. The cache is owned by `CollectionStore`. It is not synchronized. Thus a lock should be obtained on the collection store before accessing the cache.

Author:
  wolf

Field Summary

Fields inherited from interface org.exist.storage.cache.Cache
`LOG`

Constructor Summary
`CollectionCache(BrokerPool pool, int blockBuffers, double growthThreshold)`

Method Summary
`void` | `add(Collection collection)`
`void` | `add(Collection collection, int initialRefCount)`
`Collection` | `get(Collection collection)`
`Collection` | `get(XmldbURI name)`
`void` | `remove(Cacheable item)` Remove an item from the cache.
`void` | `resize(int newSize)` Resize the cache.

Methods inherited from class org.exist.storage.cache.LRDCache
`add`

Methods inherited from class org.exist.storage.cache.GClockCache
`add, flush, get, get, getBuffers, getFails, getFileName, getGrowthFactor, getHits, getLoad, getThrashing, getUsedBuffers, hasDirtyItems, setCacheManager, setFileName`

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

Constructor Detail

### CollectionCache

    public CollectionCache(BrokerPool pool,
                           int blockBuffers,
                           double growthThreshold)

Method Detail

### add

    public void add(Collection collection)

### add

    public void add(Collection collection,
                    int initialRefCount)

### get

    public Collection get(Collection collection)

### get

    public Collection get(XmldbURI name)

### remove

    public void remove(Cacheable item)

  Description copied from interface: `Cache`
  Remove an item from the cache.

  Specified by:
    `remove` in interface `Cache`
  Overrides:
    `remove` in class `GClockCache`

### resize

    public void resize(int newSize)

  Description copied from interface: `Cache`
  Resize the cache. This method is called by the `CacheManager`. The newSize parameter can either be larger or smaller than the current cache size.

  Specified by:
    `resize` in interface `Cache`
  Overrides:
    `resize` in class `GClockCache`

Overview | Package | Class | Deprecated | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright (C) Wolfgang Meier. All rights reserved.