summaryrefslogtreecommitdiff
path: root/db-4.8.30/examples_java/src/db/repquote/RepQuoteEnvironment.java
diff options
context:
space:
mode:
Diffstat (limited to 'db-4.8.30/examples_java/src/db/repquote/RepQuoteEnvironment.java')
-rw-r--r--db-4.8.30/examples_java/src/db/repquote/RepQuoteEnvironment.java59
1 files changed, 59 insertions, 0 deletions
diff --git a/db-4.8.30/examples_java/src/db/repquote/RepQuoteEnvironment.java b/db-4.8.30/examples_java/src/db/repquote/RepQuoteEnvironment.java
new file mode 100644
index 0000000..af475b6
--- /dev/null
+++ b/db-4.8.30/examples_java/src/db/repquote/RepQuoteEnvironment.java
@@ -0,0 +1,59 @@
+/*-
+ * See the file LICENSE for redistribution information.
+ *
+ * Copyright (c) 1997-2009 Oracle. 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;
+ }
+}
+