1 /*- 2 * Copyright (c) 2001, 2020 Oracle and/or its affiliates. All rights reserved. 3 * 4 * See the file EXAMPLES-LICENSE for license information. 5 * 6 */ 7 8 package db.repquote_gsg; 9 10 import com.sleepycat.db.*; 11 12 /* 13 * A simple wrapper class, that facilitates storing some 14 * custom information with an Environment object. 15 * The information is used by the Replication callback (handleEvent). 16 */ 17 public class RepQuoteEnvironment extends Environment 18 { 19 private boolean isMaster; 20 RepQuoteEnvironment(final java.io.File host, EnvironmentConfig config)21 public RepQuoteEnvironment(final java.io.File host, 22 EnvironmentConfig config) 23 throws DatabaseException, java.io.FileNotFoundException 24 { 25 super(host, config); 26 isMaster = false; 27 } 28 getIsMaster()29 boolean getIsMaster() 30 { 31 return isMaster; 32 } 33 setIsMaster(boolean isMaster)34 public void setIsMaster(boolean isMaster) 35 { 36 this.isMaster = isMaster; 37 } 38 } 39 40