01: /**
02: * Objective Database Abstraction Layer (ODAL)
03: * Copyright (c) 2004, The ODAL Development Group
04: * All rights reserved.
05: * For definition of the ODAL Development Group please refer to LICENCE.txt file
06: *
07: * Distributable under LGPL license.
08: * See terms of license at gnu.org.
09: */package com.completex.objective.components.cache;
10:
11: /**
12: * Factory of resources to be cached with Cache
13: * @see Cache
14: *
15: * @author Gennady Krizhevsky
16: */
17: public interface CacheResourceFactory {
18:
19: /**
20: * Create resource withing given context
21: *
22: * @param context
23: * @param key
24: * @return resource
25: */
26: Object createResource(Object context, Object key);
27:
28: /**
29: * Destroy resource withing given context
30: *
31: * @param context
32: * @param resource
33: */
34: void destroyResource(Object context, Object resource);
35: }
|