01: /*-
02: * See the file LICENSE for redistribution information.
03: *
04: * Copyright (c) 2000,2008 Oracle. All rights reserved.
05: *
06: * $Id: PrimaryKeyAssigner.java,v 1.28.2.2 2008/01/07 15:14:06 cwl Exp $
07: */
08:
09: package com.sleepycat.collections;
10:
11: import com.sleepycat.je.DatabaseEntry;
12: import com.sleepycat.je.DatabaseException;
13:
14: /**
15: * An interface implemented to assign new primary key values.
16: * An implementation of this interface is passed to the {@link StoredMap}
17: * or {@link StoredSortedMap} constructor to assign primary keys for that
18: * store. Key assignment occurs when <code>StoredMap.append()</code> is called.
19: *
20: * @author Mark Hayes
21: */
22: public interface PrimaryKeyAssigner {
23:
24: /**
25: * Assigns a new primary key value into the given data buffer.
26: */
27: void assignKey(DatabaseEntry keyData) throws DatabaseException;
28: }
|