01: /*
02: * Copyright (c) 1998 - 2005 Versant Corporation
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * Versant Corporation - initial API and implementation
10: */
11: package com.versant.core.server;
12:
13: import com.versant.core.common.OID;
14: import com.versant.core.common.State;
15:
16: /**
17: * This is implemented by containers that holds oid-state pairs and is used for
18: * transport to client.
19: */
20: public interface StateContainer extends StateReceiver {
21: /**
22: * This is called to indicate that the state is in the process of
23: * being fetched.
24: */
25: public void visited(OID oid);
26:
27: /**
28: * Check if OID is contained.
29: */
30: public boolean containsKey(Object key);
31:
32: /**
33: * Add an oid state pair. This is called for a direct add.
34: */
35: public State add(OID key, State value);
36:
37: /**
38: * Return the state for the oid if contains.
39: */
40: public State get(Object key);
41: }
|