Overview | Package | Class | Tree | Index | Help

Oracle® Coherence Java API Reference
v3.5.3
E15583-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.tangosol.net.cache
Class CacheLoaderCacheStore

    java.lang.Object
      com.tangosol.util.Base
          com.tangosol.net.cache.AbstractCacheLoader
              com.tangosol.net.cache.AbstractCacheStore
                  com.tangosol.net.cache.CacheLoaderCacheStore

All Implemented Interfaces:
  CacheLoader, CacheStore

Direct Known Subclasses:
  CacheLoaderCacheStore.Iterable

    public class CacheLoaderCacheStore

extends AbstractCacheStore

A read-only CacheStore that wraps a CacheLoader.

Since:
  Coherence 3.2
Author:
  cp 2006.09.06

Nested Class Summary
`static class` | `CacheLoaderCacheStore.Iterable` An extension to the CacheLoaderCacheStore that implements the IterableCacheLoader interface.

Field Summary
`protected CacheLoader` | `m_loader` The CacheLoader to delegate to.

Constructor Summary
`CacheLoaderCacheStore(CacheLoader loader)` The CacheLoader to delegate to.

Method Summary
`java.lang.Object` | `load(java.lang.Object oKey)` Return the value associated with the specified key, or null if the key does not have an associated value in the underlying store.
`java.util.Map` | `loadAll(java.util.Collection colKeys)` Return the values associated with each the specified keys in the passed collection.
`static CacheStore` | `wrapCacheLoader(CacheLoader loader)` Create a CacheStore wrapper for the passed CacheLoader.

Methods inherited from class com.tangosol.net.cache.AbstractCacheStore
`erase, eraseAll, store, storeAll`

Field Detail

### m_loader

    protected CacheLoader m_loader

  The CacheLoader to delegate to.

Constructor Detail

### CacheLoaderCacheStore

    public CacheLoaderCacheStore(CacheLoader loader)

  The CacheLoader to delegate to.

Method Detail

### wrapCacheLoader

    public static CacheStore wrapCacheLoader(CacheLoader loader)

  Create a CacheStore wrapper for the passed CacheLoader. Note that the returned CacheStore will implement the IterableCacheLoader interface if and only if the passed CacheLoader implements it.

  Parameters:
    `loader` - the CacheLoader to wrap
  Returns:
    a CacheStore

### load

    public java.lang.Object load(java.lang.Object oKey)

  Return the value associated with the specified key, or null if the key does not have an associated value in the underlying store.

  Specified by:
    `load` in interface `CacheLoader`
  Specified by:
    `load` in class `AbstractCacheLoader`
  Parameters:
    `oKey` - key whose associated value is to be returned
  Returns:
    the value associated with the specified key, or `null` if no value is available for that key

### loadAll

    public java.util.Map loadAll(java.util.Collection colKeys)

  Return the values associated with each the specified keys in the passed collection. If a key does not have an associated value in the underlying store, then the return map will not have an entry for that key.

  Specified by:
    `loadAll` in interface `CacheLoader`
  Overrides:
    `loadAll` in class `AbstractCacheLoader`
  Parameters:
    `colKeys` - a collection of keys to load
  Returns:
    a Map of keys to associated values for the specified keys

Overview | Package | Class | Tree | Index | Help

Oracle® Coherence Java API Reference
v3.5.3
E15583-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000, 2010, Oracle. All rights reserved.