1/*- 2 * See the file LICENSE for redistribution information. 3 * 4 * Copyright (c) 2000,2008 Oracle. All rights reserved. 5 * 6 * $Id: PrimaryKeyAssigner.java,v 12.6 2008/01/08 20:58:36 bostic Exp $ 7 */ 8 9package com.sleepycat.collections; 10 11import com.sleepycat.db.DatabaseEntry; 12import com.sleepycat.db.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 */ 22public 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