Oracle Fusion Middleware Java API Reference for Oracle ADF Mobile Client
11g Release 1 (11.1.1)

E17503-02

oracle.adfnmc.cache
Class SimpleCache

java.lang.Object
  extended by oracle.adfnmc.cache.SimpleCache
Direct Known Subclasses:
ImmutableCache, MetaDataCache

public class SimpleCache
extends java.lang.Object


Field Summary
protected  Map access
           
protected  java.lang.Object cddr
           
protected  Properties config
           
protected  Map data
           
static java.lang.String MAX_COUNT
           
static java.lang.String MAX_IDLE
           
protected  CacheProvider provider
           
static java.lang.String UNTYPED
           
 
Constructor Summary
SimpleCache(CacheProvider provider, java.lang.Object cddr)
          Constructor for a simple cache who attempts to populates itself (on misses) by invoking a predetermined provider fetch method (if the provider is non-null).
 
Method Summary
 void dumpCache(java.lang.String name, java.lang.String type)
           
 java.lang.Object get(java.lang.Object key, java.lang.String type)
          Retrieve the element from the cache, if it is not there attempt to fetch the value from the pre-registered provider.
 java.lang.Object getConfiguration(java.lang.String property)
           
 Set keySet(java.lang.String type)
           
protected  void log(Level level, ResourceBundle bundle, java.lang.String key, java.lang.Object[] params)
           
protected  void log(Level level, java.lang.String msg)
           
 void put(java.lang.Object key, java.lang.String type, java.lang.Object value)
          Put an item (and update the last access timestamp) in the cache
 void reset(java.lang.String type)
          reset the cache
 void setConfiguration(java.lang.String property, java.lang.String value)
           
 int size(java.lang.String type)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

UNTYPED

public static final java.lang.String UNTYPED
See Also:
Constant Field Values

MAX_COUNT

public static final java.lang.String MAX_COUNT
See Also:
Constant Field Values

MAX_IDLE

public static final java.lang.String MAX_IDLE
See Also:
Constant Field Values

data

protected Map data

access

protected Map access

config

protected Properties config

provider

protected CacheProvider provider

cddr

protected java.lang.Object cddr
Constructor Detail

SimpleCache

public SimpleCache(CacheProvider provider,
                   java.lang.Object cddr)
Constructor for a simple cache who attempts to populates itself (on misses) by invoking a predetermined provider fetch method (if the provider is non-null).

Parameters:
provider - of data on cache misses
cddr - (client data direct reference) used by the provider
Method Detail

getConfiguration

public java.lang.Object getConfiguration(java.lang.String property)

setConfiguration

public void setConfiguration(java.lang.String property,
                             java.lang.String value)

get

public java.lang.Object get(java.lang.Object key,
                            java.lang.String type)
Retrieve the element from the cache, if it is not there attempt to fetch the value from the pre-registered provider.

Parameters:
key - of the cache item
type - of the cache item
Returns:
value of the cached item

put

public void put(java.lang.Object key,
                java.lang.String type,
                java.lang.Object value)
Put an item (and update the last access timestamp) in the cache

Parameters:
key - index into the cache
value - of the item adding to the cache

keySet

public Set keySet(java.lang.String type)

reset

public void reset(java.lang.String type)
reset the cache


dumpCache

public void dumpCache(java.lang.String name,
                      java.lang.String type)

size

public int size(java.lang.String type)
Returns:
the current size of the cache

log

protected void log(Level level,
                   java.lang.String msg)

log

protected void log(Level level,
                   ResourceBundle bundle,
                   java.lang.String key,
                   java.lang.Object[] params)

Oracle Fusion Middleware Java API Reference for Oracle ADF Mobile Client
11g Release 1 (11.1.1)

E17503-02

Copyright © 2011, Oracle and/or its affiliates. All rights reserved.