HeartbeatThread.java revision 1183
759N/A * The contents of this file are subject to the terms of the 759N/A * Common Development and Distribution License, Version 1.0 only 759N/A * (the "License"). You may not use this file except in compliance 759N/A * You can obtain a copy of the license at 759N/A * See the License for the specific language governing permissions 759N/A * and limitations under the License. 759N/A * When distributing Covered Code, include this CDDL HEADER in each 759N/A * file and include the License file at 759N/A * add the following below this CDDL HEADER, with the fields enclosed 873N/A * by brackets "[]" replaced with your own identifying information: 759N/A * Portions Copyright [yyyy] [name of copyright owner] 759N/A * Portions Copyright 2007 Sun Microsystems, Inc. 759N/A * This thread publishes a heartbeat message on a given protocol session at 1183N/A * regular intervals when there are no other replication messages being 759N/A * For test purposes only to simulate loss of heartbeats. 759N/A * The session on which heartbeats are to be sent. 759N/A * The time in milliseconds between heartbeats. 759N/A * Set this to stop the thread. 759N/A * Create a heartbeat thread. 759N/A * @param threadName The name of the heartbeat thread. 759N/A * @param session The session on which heartbeats are to be sent. 759N/A * @param heartbeatInterval The desired interval between heartbeats in 759N/A // This will be caught in another thread. 759N/A * Call this method to stop the thread. 759N/A * For testing purposes only to simulate loss of heartbeats. 759N/A * @param heartbeatsDisabled Set true to prevent heartbeats from being sent.