diff options
Diffstat (limited to 'examples/java/src/db/repquote/RepQuoteEnvironment.java')
| -rw-r--r-- | examples/java/src/db/repquote/RepQuoteEnvironment.java | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/examples/java/src/db/repquote/RepQuoteEnvironment.java b/examples/java/src/db/repquote/RepQuoteEnvironment.java new file mode 100644 index 00000000..75a50e0e --- /dev/null +++ b/examples/java/src/db/repquote/RepQuoteEnvironment.java @@ -0,0 +1,59 @@ +/*- + * See the file LICENSE for redistribution information. + * + * Copyright (c) 1997, 2012 Oracle and/or its affiliates. All rights reserved. + * + * $Id$ + */ + +package db.repquote; + +import com.sleepycat.db.*; + +/* + * A simple wrapper class, that facilitates storing some + * custom information with an Environment object. + * The information is used by the Replication callback (handleEvent). + */ +public class RepQuoteEnvironment extends Environment +{ + private boolean appFinished; + private boolean inClientSync; + private boolean isMaster; + + public RepQuoteEnvironment(final java.io.File host, + EnvironmentConfig config) + throws DatabaseException, java.io.FileNotFoundException + { + super(host, config); + appFinished = false; + inClientSync = false; + isMaster = false; + } + + boolean getAppFinished() + { + return appFinished; + } + public void setAppFinished(boolean appFinished) + { + this.appFinished = appFinished; + } + boolean getInClientSync() + { + return inClientSync; + } + public void setInClientSync(boolean inClientSync) + { + this.inClientSync = inClientSync; + } + boolean getIsMaster() + { + return isMaster; + } + public void setIsMaster(boolean isMaster) + { + this.isMaster = isMaster; + } +} + |
