/* * - * See the file LICENSE for redistribution information. * * Copyright (c) 2001-2003 * Sleepycat Software. All rights reserved. * * $Id: DbRepTransport.java,v 11.25 2003/11/28 18:35:46 bostic Exp $ */ package com.sleepycat.db; /** * An interface specifying a replication transmit function, which * sends information to other members of the replication group.
*/ public interface DbRepTransport { /** * The DbRepTransport interface is used by the * DbEnv.setReplicationTransport method. This interface defines * the application-specific function to be called during * transaction abort and recovery. It may sometimes be useful * to pass application-specific data to the send function; * see Environment FAQ * for a discussion on how to do this. * * @param dbenv the enclosing database environment * handle. * @param control the first of the two data elements to be * transmitted by the send function. * @param rec the second of the two data elements to be * transmitted by the send function. * @param lsn If the type of message to be sent has an * LSN associated with it, then the lsn parameter * contains the LSN of the record being sent. This LSN can be * used to determine that certain records have been processed * successfully by clients. * @param envid a positive integer identifier that * specifies the replication environment to which the message * should be sent (see * Replication environment IDs for more information). * *
*
* The special identifier Db.DB_EID_BROADCAST
* indicates that a message should be broadcast to every
* environment in the replication group. The application
* may use a true broadcast protocol or may send the
* message in sequence to each machine with which it is in
* communication. In both cases, the sending site should
* not be asked to process the message.
* * The record being sent should be transmitted immediately * and not buffered or delayed.
* * The record being sent is critical for maintaining * database integrity (for example, the message includes a * transaction commit). The application should take * appropriate action to enforce the reliability guarantees * it has chosen, such as waiting for acknowledgement from * one or more clients.