KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sleepycat > collections > PrimaryKeyAssigner


1 /*-
2  * See the file LICENSE for redistribution information.
3  *
4  * Copyright (c) 2000,2006 Oracle. All rights reserved.
5  *
6  * $Id: PrimaryKeyAssigner.java,v 1.28 2006/10/30 21:14:10 bostic Exp $
7  */

8
9 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)
28         throws DatabaseException;
29 }
30
Popular Tags