Lines Matching full:env

12         self.env = db.DBEnv()
15 self.env.close()
16 del self.env
22 self.env.open(self.homeDir, flags)
23 self.assertEqual(flags, self.env.get_open_flags())
28 self.env.open(self.homeDir, flags)
29 self.assertEqual(flags, self.env.get_open_flags())
34 self.env.set_lk_partitions(i)
35 self.assertEqual(i, self.env.get_lk_partitions())
38 self.assertEqual(None, self.env.get_intermediate_dir_mode())
40 self.env.set_intermediate_dir_mode(mode)
41 self.assertEqual(mode, self.env.get_intermediate_dir_mode())
43 self.env.set_intermediate_dir_mode, "abcde")
48 self.env.set_thread_count(i)
49 self.assertEqual(i, self.env.get_thread_count())
54 self.env.set_cache_max(0, size)
55 size2 = self.env.get_cache_max()
62 self.env.open(self.homeDir, db.DB_CREATE | db.DB_INIT_MPOOL |
64 stat = self.env.mutex_stat()
69 self.env.set_lg_filemode(i)
70 self.assertEqual(i, self.env.get_lg_filemode())
74 self.env.set_mp_max_openfd(i)
75 self.assertEqual(i, self.env.get_mp_max_openfd())
81 self.env.set_mp_max_write(i, j)
82 v=self.env.get_mp_max_write()
87 self.assertRaises(db.DBInvalidArgError, self.env.txn_begin)
92 self.env.set_mp_mmapsize(i)
93 self.assertEqual(i, self.env.get_mp_mmapsize())
97 self.env.set_tmp_dir(i)
98 self.assertEqual(i, self.env.get_tmp_dir())
101 self.env.set_flags(db.DB_AUTO_COMMIT, 1)
102 self.assertEqual(db.DB_AUTO_COMMIT, self.env.get_flags())
103 self.env.set_flags(db.DB_TXN_NOSYNC, 1)
105 self.env.get_flags())
106 self.env.set_flags(db.DB_AUTO_COMMIT, 0)
107 self.assertEqual(db.DB_TXN_NOSYNC, self.env.get_flags())
108 self.env.set_flags(db.DB_TXN_NOSYNC, 0)
109 self.assertEqual(0, self.env.get_flags())
113 self.env.set_lk_max_objects(i)
114 self.assertEqual(i, self.env.get_lk_max_objects())
118 self.env.set_lk_max_locks(i)
119 self.assertEqual(i, self.env.get_lk_max_locks())
123 self.env.set_lk_max_lockers(i)
124 self.assertEqual(i, self.env.get_lk_max_lockers())
129 self.env.set_lg_regionmax(i)
130 j = self.env.get_lg_regionmax()
142 self.env.set_lk_detect(i)
143 self.assertEqual(i, self.env.get_lk_detect())
147 self.env.set_lg_dir(i)
148 self.assertEqual(i, self.env.get_lg_dir())
152 self.env.set_lg_bsize(log_size)
153 self.assertGreaterEqual(self.env.get_lg_bsize(), log_size)
154 self.assertLess(self.env.get_lg_bsize(), 4*log_size)
155 self.env.set_lg_bsize(4*log_size)
156 self.assertGreaterEqual(self.env.get_lg_bsize(), 4*log_size)
161 self.env.set_data_dir(i)
162 self.assertEqual(dirs, self.env.get_data_dirs())
166 self.env.set_cachesize(*cachesize)
167 self.assertEqual(cachesize, self.env.get_cachesize())
170 self.env.set_cachesize(*cachesize)
171 cachesize2 = self.env.get_cachesize()
180 self.env.open(self.homeDir, db.DB_CREATE | db.DB_INIT_MPOOL)
183 self.env.set_cachesize, *cachesize)
184 cachesize3 = self.env.get_cachesize()
187 # In Berkeley DB 5.1, the cachesize can change when opening the Env
193 d = db.DB(self.env)
199 self.env.set_shm_key(shm_key)
200 self.assertEqual(shm_key, self.env.get_shm_key())
201 self.env.set_shm_key(shm_key+1)
202 self.assertEqual(shm_key+1, self.env.get_shm_key())
206 self.env.open(self.homeDir, db.DB_CREATE | db.DB_INIT_MPOOL)
210 self.env.set_shm_key, shm_key)
211 self.assertEqual(shm_key+1, self.env.get_shm_key())
215 v = self.env.mutex_get_max()
218 self.env.mutex_set_max(v2)
219 self.assertEqual(v2, self.env.mutex_get_max())
221 self.env.mutex_set_max(v)
222 self.assertEqual(v, self.env.mutex_get_max())
226 self.env.open(self.homeDir, db.DB_CREATE)
228 self.env.mutex_set_max, v2)
231 v = self.env.mutex_get_increment()
234 self.env.mutex_set_increment(v2)
235 self.assertEqual(v2, self.env.mutex_get_increment())
237 self.env.mutex_set_increment(v)
238 self.assertEqual(v, self.env.mutex_get_increment())
242 self.env.open(self.homeDir, db.DB_CREATE)
244 self.env.mutex_set_increment, v2)
247 self.env.mutex_set_tas_spins(0) # Default = BDB decides
248 v = self.env.mutex_get_tas_spins()
251 self.env.mutex_set_tas_spins(v2)
252 self.assertEqual(v2, self.env.mutex_get_tas_spins())
254 self.env.mutex_set_tas_spins(v)
255 self.assertEqual(v, self.env.mutex_get_tas_spins())
259 self.env.open(self.homeDir, db.DB_CREATE)
260 self.env.mutex_set_tas_spins(v2)
263 v = self.env.mutex_get_align()
268 self.env.mutex_set_align(v2)
269 self.assertEqual(v2, self.env.mutex_get_align())
273 self.env.mutex_set_align, 0)
275 self.env.mutex_set_align, 17)
277 self.env.mutex_set_align(2*v2)
278 self.assertEqual(2*v2, self.env.mutex_get_align())
282 self.env.open(self.homeDir, db.DB_CREATE)
284 self.env.mutex_set_align, v2)
290 self.env.open(self.homeDir, db.DB_CREATE | db.DB_INIT_MPOOL | db.DB_INIT_LOG)
293 log_file = self.env.log_file((1, 1))
300 self.env.log_printf(msg)
301 logc = self.env.log_cursor()
306 self.env.log_set_config(db.DB_LOG_DSYNC | db.DB_LOG_ZERO, 1)
307 self.assertTrue(self.env.log_get_config(db.DB_LOG_DSYNC))
308 self.assertTrue(self.env.log_get_config(db.DB_LOG_ZERO))
309 self.env.log_set_config(db.DB_LOG_ZERO, 0)
310 self.assertTrue(self.env.log_get_config(db.DB_LOG_DSYNC))
311 self.assertFalse(self.env.log_get_config(db.DB_LOG_ZERO))
317 self.env.open(self.homeDir, db.DB_CREATE | db.DB_INIT_MPOOL |
324 for i in xrange(self.env.get_tx_max()) :
325 txns.append(self.env.txn_begin())
339 txn = self.env.txn_begin()
340 self.env.log_printf(msg, txn=txn)
342 logc = self.env.log_cursor()
347 txn = self.env.txn_begin()
348 self.env.log_printf(msg, txn=txn)
354 txn = self.env.txn_begin()
355 self.env.log_printf(msg, txn=txn)
364 self.env.open(self.homeDir, db.DB_CREATE | db.DB_INIT_MPOOL | db.DB_INIT_LOG)
365 self.db = db.DB(self.env)
375 self.assertGreater(self.env.memp_trickle(100), 0)
380 self.env.memp_sync() # Full flush
382 self.assertEqual(self.env.memp_trickle(100), 0)
385 self.env.memp_sync((1, 0)) # NOP, probably
387 self.assertGreaterEqual(self.env.memp_trickle(100), 0)
390 self.env.memp_sync((123, 99)) # Full flush
392 self.assertEqual(self.env.memp_trickle(100), 0)
395 stats = self.env.memp_stat() # No param
398 stats = self.env.memp_stat(db.DB_STAT_CLEAR) # Positional param
400 stats = self.env.memp_stat(flags=0) # Keyword param
404 stats=self.env.memp_stat()[1]
412 self.env.open(self.homeDir, db.DB_CREATE | db.DB_INIT_MPOOL |
414 txn = self.env.txn_begin()
415 self.db = db.DB(self.env)
419 txn = self.env.txn_begin()
439 logc = self.env.log_cursor()
446 logc = self.env.log_cursor()
453 logc = self.env.log_cursor()
471 logc = self.env.log_cursor()
489 logc = self.env.log_cursor()
495 logc = self.env.log_cursor()
503 logc = self.env.log_cursor()
508 logc = [self.env.log_cursor() for i in xrange(10)]
509 self.env.close() # This close should close too all its tree