Save This Page
Home » openejb-3.1.2-src » org.apache » openejb » core » stateful » [javadoc | source]
org.apache.openejb.core.stateful
public interface: Cache [javadoc | source]

All Known Implementing Classes:
    SimpleCache

Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Nested Class Summary:
public interface  Cache.CacheListener  Callback listener for cache events. 
public interface  Cache.CacheFilter  CacheFileter is used to select values to remove during a removeAll invocation. 
Method from org.apache.openejb.core.stateful.Cache Summary:
add,   checkIn,   checkOut,   getListener,   remove,   removeAll,   setListener
Method from org.apache.openejb.core.stateful.Cache Detail:
 public  void add(K key,
    V value)
    Add a new entry to the cache. The entry is marked checked-out and can not be accessed again until checked-in.
 public  void checkIn(K key)
    Marks the entry available, so it can be accessed again.
 public V checkOut(K key) throws Exception
    Marks the entry checked-out, so this entry can not be accessed until checked-in.
 public CacheListener<V> getListener()
    Gets the listener for cache events.
 public V remove(K key)
    Removes the entry from the cache.
 public  void removeAll(CacheFilter<V> filter)
    Removes all of th entries that match the specified filter.
 public  void setListener(CacheListener<V> listener)
    Sets the listener for cache events. This should be called by the container before using the cache.