summaryrefslogtreecommitdiff
path: root/examples/csharp/excs_repquote/RepQuoteEnvironment.cs
blob: fed9df314ed859012a0d0b9d1ad0136288389d1c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/*-
 * See the file LICENSE for redistribution information.
 *
 * Copyright (c) 2009, 2015 Oracle and/or its affiliates.  All rights reserved.
 *
 */
using System;
using System.Collections.Generic;
using System.Text;

using BerkeleyDB;

namespace excs_repquote
{
	public class RepQuoteEnvironment
	{
		private bool _appFinished;
		private bool _inClientSync;
		private bool _isMaster;
		public DatabaseEnvironment env;

		public bool AppFinished { 
			get { return _appFinished; }
			set { _appFinished = value; }
		}
		public bool InClientSync { 
			get { return _inClientSync; }
			set { _inClientSync = value; }
		}
		public bool IsMaster { 
			get { return _isMaster; }
			set { _isMaster = value; }
		}

		public static RepQuoteEnvironment Open(string home, DatabaseEnvironmentConfig cfg)
		{
			RepQuoteEnvironment dbEnv = new RepQuoteEnvironment();
			dbEnv.env = DatabaseEnvironment.Open(home, cfg);
			dbEnv._appFinished = false;
			dbEnv._inClientSync = false;
			dbEnv._isMaster = false;
			return dbEnv;
		}
	}
}