KickJava   Java API By Example, From Geeks To Geeks.

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


1 //$Id: CacheProvider.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  * Support for pluggable caches.
8  *
9  * @author Gavin King
10  */

11 public interface CacheProvider {
12
13     /**
14      * Configure the cache
15      *
16      * @param regionName the name of the cache region
17      * @param properties configuration settings
18      * @throws CacheException
19      */

20     public Cache buildCache(String JavaDoc regionName, Properties JavaDoc properties) throws CacheException;
21
22     /**
23      * Generate a timestamp
24      */

25     public long nextTimestamp();
26
27     /**
28      * Callback to perform any necessary initialization of the underlying cache implementation
29      * during SessionFactory construction.
30      *
31      * @param properties current configuration settings.
32      */

33     public void start(Properties JavaDoc properties) throws CacheException;
34
35     /**
36      * Callback to perform any necessary cleanup of the underlying cache implementation
37      * during SessionFactory.close().
38      */

39     public void stop();
40     
41     public boolean isMinimalPutsEnabledByDefault();
42
43 }
44
Popular Tags