01: /*
02: * This file is part of the WfMOpen project.
03: * Copyright (C) 2001-2003 Danet GmbH (www.danet.de), GS-AN.
04: * All rights reserved.
05: *
06: * This program is free software; you can redistribute it and/or modify
07: * it under the terms of the GNU General Public License as published by
08: * the Free Software Foundation; either version 2 of the License, or
09: * (at your option) any later version.
10: *
11: * This program is distributed in the hope that it will be useful,
12: * but WITHOUT ANY WARRANTY; without even the implied warranty of
13: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14: * GNU General Public License for more details.
15: *
16: * You should have received a copy of the GNU General Public License
17: * along with this program; if not, write to the Free Software
18: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19: *
20: * $Id: PersistentMap.java,v 1.2 2006/09/29 12:32:08 drmlipp Exp $
21: *
22: * $Log: PersistentMap.java,v $
23: * Revision 1.2 2006/09/29 12:32:08 drmlipp
24: * Consistently using WfMOpen as projct name now.
25: *
26: * Revision 1.1.1.1 2003/06/30 20:05:12 drmlipp
27: * Initial import
28: *
29: * Revision 1.5 2003/06/27 08:51:47 lipp
30: * Fixed copyright/license information.
31: *
32: * Revision 1.4 2002/08/30 07:24:25 schlue
33: * isModified added.
34: *
35: * Revision 1.3 2002/08/22 08:36:07 schlue
36: * Max key length added.
37: * Garbage collection optimzed.
38: *
39: * Revision 1.2 2001/12/07 12:33:17 schlue
40: * Implementation of persistent map finished
41: *
42: * Revision 1.1 2001/12/04 15:37:51 lipp
43: * New package for persistent maps.
44: *
45: */
46:
47: package de.danet.an.util;
48:
49: import java.util.Map;
50: import java.io.IOException;
51:
52: /**
53: * This interface defines a persistent map. The entries in a persistent
54: * map can be loaded from or saved to persistent storage.
55: */
56: public interface PersistentMap extends Map {
57:
58: /**
59: * Loads the map from persistent store. The data needed to define
60: * the persistent store is usually passed as parameters to the
61: * constructor of the implementing class.
62: * @throws IOException problems while loading the map
63: */
64: public void load() throws IOException;
65:
66: /**
67: * Stores the map in persistent store. The data needed to define
68: * the persistent store is usually passed as parameters to the
69: * constructor of the implementing class.
70: * @throws IOException problems while storing the map
71: */
72: public void store() throws IOException;
73:
74: /**
75: * Retrieves the information about the maximum string length of key
76: * entries.
77: * @return the maximum string length of key entries
78: * @throws IOException problems while storing the map
79: */
80: public int maxKeyLength() throws IOException;
81:
82: /**
83: * Indicates whether modifications need to be saved currently.
84: * @return true, if there are non-saved modifications, otherwise false.
85: */
86: public boolean isModified();
87: }
|