KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > hibernate > cache > HashtableCacheProvider


1 //$Id: HashtableCacheProvider.java,v 1.5 2005/02/12 07:19:08 steveebersole Exp $
2
package org.hibernate.cache;
3
4 import java.util.Properties JavaDoc;
5
6 /**
7  * A simple in-memory Hashtable-based cache impl.
8  *
9  * @author Gavin King
10  */

11 public class HashtableCacheProvider implements CacheProvider {
12
13     public Cache buildCache(String JavaDoc regionName, Properties JavaDoc properties) throws CacheException {
14         return new HashtableCache( regionName );
15     }
16
17     public long nextTimestamp() {
18         return Timestamper.next();
19     }
20
21     /**
22      * Callback to perform any necessary initialization of the underlying cache implementation
23      * during SessionFactory construction.
24      *
25      * @param properties current configuration settings.
26      */

27     public void start(Properties JavaDoc properties) throws CacheException {
28     }
29
30     /**
31      * Callback to perform any necessary cleanup of the underlying cache implementation
32      * during SessionFactory.close().
33      */

34     public void stop() {
35     }
36
37     public boolean isMinimalPutsEnabledByDefault() {
38         return false;
39     }
40
41 }
42
43
Popular Tags