com.sleepycat.db

## Interface Slice

    public interface Slice

An interface specifying in which slice database records are read or written based on the given key. If this interface is not used, then the entire contents of the key are used to determine which slice contains a given database record. Use this interface only if a portion of the key should be used to determine slice placement.

You configure the database with this handler using the `DatabaseConfig.setSliceCallback(com.sleepycat.db.Slice)` method.

### Method Summary

All Methods Instance Methods Abstract Methods
`boolean` `slice(Database db, DatabaseEntry key, DatabaseEntry sliceKey)` The application-specific database slice callback.

### Method Detail

#### slice

    boolean slice(Database db,
                  DatabaseEntry key,
                  DatabaseEntry sliceKey)

The application-specific database slice callback.

Parameters:
  `db` - The enclosing database handle.
  `key` - A database entry representing the database key that is being put into the database, or used to retrieve an existing record in the database.
  `sliceKey` - A database entry containing data used to determine to what slice the key is applied.
Returns:
  True on success, false if there is an error.