Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Source code: org/hibernate/cache/HashtableCacheProvider.java


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;
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 regionName, Properties 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 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