diff options
| author | Lorry Tar Creator <lorry-tar-importer@baserock.org> | 2015-02-17 17:25:57 +0000 |
|---|---|---|
| committer | <> | 2015-03-17 16:26:24 +0000 |
| commit | 780b92ada9afcf1d58085a83a0b9e6bc982203d1 (patch) | |
| tree | 598f8b9fa431b228d29897e798de4ac0c1d3d970 /docs/gsg_db_rep/JAVA/simpleprogramlisting.html | |
| parent | 7a2660ba9cc2dc03a69ddfcfd95369395cc87444 (diff) | |
| download | berkeleydb-master.tar.gz | |
Diffstat (limited to 'docs/gsg_db_rep/JAVA/simpleprogramlisting.html')
| -rw-r--r-- | docs/gsg_db_rep/JAVA/simpleprogramlisting.html | 30 |
1 files changed, 14 insertions, 16 deletions
diff --git a/docs/gsg_db_rep/JAVA/simpleprogramlisting.html b/docs/gsg_db_rep/JAVA/simpleprogramlisting.html index bde88155..777b40b8 100644 --- a/docs/gsg_db_rep/JAVA/simpleprogramlisting.html +++ b/docs/gsg_db_rep/JAVA/simpleprogramlisting.html @@ -14,7 +14,7 @@ <body> <div xmlns="" class="navheader"> <div class="libver"> - <p>Library Version 11.2.5.3</p> + <p>Library Version 12.1.6.1</p> </div> <table width="100%" summary="Navigation header"> <tr> @@ -201,11 +201,11 @@ import com.sleepycat.db.Environment; import com.sleepycat.db.EnvironmentConfig; import com.sleepycat.db.LockMode; import com.sleepycat.db.OperationStatus; -import db.repquote_gsg.RepConfig; +import db.repquote_gsg.SimpleConfig; public class SimpleTxn { - private RepConfig repConfig; + private SimpleConfig simpleConfig; private Environment dbenv; </pre> <p> Next, we provide our class constructor. This simply initializes our @@ -214,7 +214,7 @@ public class SimpleTxn <pre class="programlisting"> public SimpleTxn() throws DatabaseException { - repConfig = null; + simpleConfig = null; dbenv = null; } </pre> <p> @@ -223,11 +223,9 @@ public class SimpleTxn </p> <pre class="programlisting"> public static void usage() { - System.err.println("usage: " + repConfig.progname); + System.err.println("usage: " + simpleConfig.progname); System.err.println("-h home"); - System.err.println("\t -h home directory\n"); - System.exit(1); } </pre> </div> @@ -254,7 +252,7 @@ public class SimpleTxn <pre class="programlisting"> public static void main(String[] argv) throws Exception { - RepConfig config = new RepConfig(); + SimpleConfig config = new SimpleConfig(); // Extract the command line parameters for (int i = 0; i < argv.length; i++) { @@ -326,16 +324,16 @@ public class SimpleTxn We do this because the application will eventually be replicated and so we don't need a high durability guarantee. </p> - <pre class="programlisting"> public int init(RepConfig config) + <pre class="programlisting"> public int init(SimpleConfig config) throws DatabaseException { int ret = 0; - repConfig = config; + simpleConfig = config; EnvironmentConfig envConfig = new EnvironmentConfig(); envConfig.setErrorStream(System.err); - envConfig.setErrorPrefix(RepConfig.progname); + envConfig.setErrorPrefix(SimpleConfig.progname); - envConfig.setCacheSize(RepConfig.CACHESIZE); + envConfig.setCacheSize(SimpleConfig.CACHESIZE); envConfig.setTxnNoSync(true); envConfig.setAllowCreate(true); @@ -345,7 +343,7 @@ public class SimpleTxn envConfig.setInitializeCache(true); envConfig.setTransactional(true); try { - dbenv = new Environment(repConfig.getHome(), envConfig); + dbenv = new Environment(simpleConfig.getHome(), envConfig); } catch(FileNotFoundException e) { System.err.println("FileNotFound exception: " + e.toString()); System.err.println( @@ -408,9 +406,9 @@ public class SimpleTxn try { db = dbenv.openDatabase(null, // Txn handle - RepConfig.progname, // db filename - null, // db name - dbconf); + SimpleConfig.progname, // db filename + null, // db name + dbconf); } catch (FileNotFoundException fnfe) { System.err.println("File not found exception" + fnfe.toString()); |
