JBoss API: Class NoPassivationCachePolicy

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

## org.jboss.ejb.plugins
Class NoPassivationCachePolicy

    java.lang.Object
      |
      +--org.jboss.ejb.plugins.NoPassivationCachePolicy

All Implemented Interfaces:
  CachePolicy, EnterpriseContextCachePolicy, Service

public class NoPassivationCachePolicy
extends java.lang.Object
implements EnterpriseContextCachePolicy

Implementation of a no passivation cache policy.

Version:
  $Revision: 1.4 $
Author:
  Simone Bordet (simone.bordet@compaq.com)
See Also:
  `AbstractInstanceCache`

Inner classes inherited from class org.jboss.ejb.plugins.EnterpriseContextCachePolicy
`EnterpriseContextCachePolicy.Scheduler`

Fields inherited from interface org.jboss.ejb.plugins.EnterpriseContextCachePolicy
`scheduler`

Constructor Summary
`NoPassivationCachePolicy(AbstractInstanceCache eic)` Creates a no passivation cache policy object given the instance cache that use this policy object, that btw is not used.

Method Summary
`void` | `destroy()`
`void` | `flush()` Flushes the cached objects from the cache.
`java.lang.Object` | `get(java.lang.Object key)` Returns the object paired with the specified key if it's present in the cache, otherwise must return null.
`void` | `init()`
`void` | `insert(java.lang.Object key, java.lang.Object ctx)` Inserts the specified object into the cache following the implemented policy.
`java.lang.Object` | `peek(java.lang.Object key)` Returns the object paired with the specified key if it's present in the cache, otherwise must return null.
`void` | `remove(java.lang.Object key)` Remove the cached object paired with the specified key.
`void` | `start()`
`void` | `stop()`

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

Constructor Detail

### NoPassivationCachePolicy

    public NoPassivationCachePolicy(AbstractInstanceCache eic)

  Creates a no passivation cache policy object given the instance cache that use this policy object, that btw is not used.

Method Detail

### init

    public void init()
              throws java.lang.Exception

  Specified by:
    `init` in interface `Service`

### start

    public void start()
               throws java.lang.Exception

  Specified by:
    `start` in interface `Service`

### stop

    public void stop()

  Specified by:
    `stop` in interface `Service`

### destroy

    public void destroy()

  Specified by:
    `destroy` in interface `Service`

### get

    public java.lang.Object get(java.lang.Object key)

  Description copied from interface: `CachePolicy`
  Returns the object paired with the specified key if it's present in the cache, otherwise must return null.
  Implementations of this method must have complexity of order O(1). Differently from `CachePolicy.peek(java.lang.Object)` this method not only return whether the object is present in the cache or not, but also applies the implemented policy that will "refresh" the cached object in the cache, because this cached object was really requested.
  Specified by:
    `get` in interface `CachePolicy`
  Following copied from interface: `org.jboss.util.CachePolicy`
  Parameters:
    `key` - the key paired with the object
  See Also:
    `CachePolicy.peek(java.lang.Object)`

### peek

    public java.lang.Object peek(java.lang.Object key)

  Description copied from interface: `CachePolicy`
  Returns the object paired with the specified key if it's present in the cache, otherwise must return null.
  Implementations of this method must have complexity of order O(1). This method should not apply the implemented caching policy to the object paired with the given key, so that a client can query if an object is cached without "refresh" its cache status. Real requests for the object must be done using `CachePolicy.get(java.lang.Object)`.
  Specified by:
    `peek` in interface `CachePolicy`
  Following copied from interface: `org.jboss.util.CachePolicy`
  Parameters:
    `key` - the key paired with the object
  See Also:
    `CachePolicy.get(java.lang.Object)`

### insert

    public void insert(java.lang.Object key,
                       java.lang.Object ctx)

  Description copied from interface: `CachePolicy`
  Inserts the specified object into the cache following the implemented policy.
  Implementations of this method must have complexity of order O(1).
  Specified by:
    `insert` in interface `CachePolicy`
  Following copied from interface: `org.jboss.util.CachePolicy`
  Parameters:
    `key` - the key paired with the object
    `object` - the object to cache
  See Also:
    `CachePolicy.remove(java.lang.Object)`

### remove

    public void remove(java.lang.Object key)

  Description copied from interface: `CachePolicy`
  Remove the cached object paired with the specified key.
  Implementations of this method must have complexity of order O(1).
  Specified by:
    `remove` in interface `CachePolicy`
  Following copied from interface: `org.jboss.util.CachePolicy`
  Parameters:
    `key` - the key paired with the object
  See Also:
    `CachePolicy.insert(java.lang.Object, java.lang.Object)`

### flush

    public void flush()

  Description copied from interface: `CachePolicy`
  Flushes the cached objects from the cache.
  Specified by:
    `flush` in interface `CachePolicy`

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

Copyright © 2000 The JBoss Organization. All Rights Reserved.