1/* ---------------------------------------------------------------------------- 2 * This file was automatically generated by SWIG (http://www.swig.org). 3 * Version 1.3.33 4 * 5 * Do not make changes to this file unless you know what you are doing--modify 6 * the SWIG interface file instead. 7 * ----------------------------------------------------------------------------- */ 8 9package com.sleepycat.db.internal; 10 11import com.sleepycat.db.*; 12import java.util.Comparator; 13 14public class DbEnv { 15 private long swigCPtr; 16 protected boolean swigCMemOwn; 17 18 protected DbEnv(long cPtr, boolean cMemoryOwn) { 19 swigCMemOwn = cMemoryOwn; 20 swigCPtr = cPtr; 21 } 22 23 protected static long getCPtr(DbEnv obj) { 24 return (obj == null) ? 0 : obj.swigCPtr; 25 } 26 27 /* package */ synchronized void delete() { 28 if(swigCPtr != 0 && swigCMemOwn) { 29 swigCMemOwn = false; 30 throw new UnsupportedOperationException("C++ destructor does not have public access"); 31 } 32 swigCPtr = 0; 33 } 34 35 /* 36 * Internally, the JNI layer creates a global reference to each DbEnv, 37 * which can potentially be different to this. We keep a copy here so 38 * we can clean up after destructors. 39 */ 40 private long dbenv_ref; 41 public Environment wrapper; 42 43 private LogRecordHandler app_dispatch_handler; 44 private EventHandler event_notify_handler; 45 private FeedbackHandler env_feedback_handler; 46 private ErrorHandler error_handler; 47 private String errpfx; 48 private MessageHandler message_handler; 49 private PanicHandler panic_handler; 50 private ReplicationTransport rep_transport_handler; 51 private java.io.OutputStream error_stream; 52 private java.io.OutputStream message_stream; 53 private ThreadLocal errBuf; 54 55 public static class RepProcessMessage { 56 public int envid; 57 } 58 59 /* 60 * Called by the public DbEnv constructor and for private environments 61 * by the Db constructor. 62 */ 63 void initialize() { 64 dbenv_ref = db_java.initDbEnvRef0(this, this); 65 errBuf = new ThreadLocal(); 66 /* Start with System.err as the default error stream. */ 67 set_error_stream(System.err); 68 set_message_stream(System.out); 69 } 70 71 void cleanup() { 72 swigCPtr = 0; 73 db_java.deleteRef0(dbenv_ref); 74 dbenv_ref = 0L; 75 } 76 77 public synchronized void close(int flags) throws DatabaseException { 78 try { 79 close0(flags); 80 } finally { 81 cleanup(); 82 } 83 } 84 85 private final int handle_app_dispatch(DatabaseEntry dbt, 86 LogSequenceNumber lsn, 87 int recops) { 88 return app_dispatch_handler.handleLogRecord(wrapper, dbt, lsn, 89 RecoveryOperation.fromFlag(recops)); 90 } 91 92 public LogRecordHandler get_app_dispatch() throws com.sleepycat.db.DatabaseException { 93 return app_dispatch_handler; 94 } 95 96 private final void handle_panic_event_notify() { 97 event_notify_handler.handlePanicEvent(); 98 } 99 100 private final void handle_rep_client_event_notify() { 101 event_notify_handler.handleRepClientEvent(); 102 } 103 104 private final void handle_rep_elected_event_notify() { 105 event_notify_handler.handleRepElectedEvent(); 106 } 107 108 private final void handle_rep_master_event_notify() { 109 event_notify_handler.handleRepMasterEvent(); 110 } 111 112 private final void handle_rep_new_master_event_notify(int envid) { 113 event_notify_handler.handleRepNewMasterEvent(envid); 114 } 115 116 private final void handle_rep_perm_failed_event_notify() { 117 event_notify_handler.handleRepPermFailedEvent(); 118 } 119 120 private final void handle_rep_startup_done_event_notify() { 121 event_notify_handler.handleRepStartupDoneEvent(); 122 } 123 124 private final void handle_write_failed_event_notify(int errno) { 125 event_notify_handler.handleWriteFailedEvent(errno); 126 } 127 128 public EventHandler get_event_notify() throws com.sleepycat.db.DatabaseException { 129 return event_notify_handler; 130 } 131 132 private final void handle_env_feedback(int opcode, int percent) { 133 if (opcode == DbConstants.DB_RECOVER) 134 env_feedback_handler.recoveryFeedback(wrapper, percent); 135 /* No other environment feedback type supported. */ 136 } 137 138 public FeedbackHandler get_feedback() throws com.sleepycat.db.DatabaseException { 139 return env_feedback_handler; 140 } 141 142 public void set_errpfx(String errpfx) /* no exception */ { 143 this.errpfx = errpfx; 144 } 145 146 public String get_errpfx() /* no exception */ { 147 return errpfx; 148 } 149 150 private final void handle_error(String msg) { 151 com.sleepycat.util.ErrorBuffer ebuf = (com.sleepycat.util.ErrorBuffer)errBuf.get(); 152 if (ebuf == null) { 153 /* 154 * Populate the errBuf ThreadLocal on demand, since the 155 * callback can be made from different threads. 156 */ 157 ebuf = new com.sleepycat.util.ErrorBuffer(3); 158 errBuf.set(ebuf); 159 } 160 ebuf.append(msg); 161 error_handler.error(wrapper, this.errpfx, msg); 162 } 163 164 private final String get_err_msg(String orig_msg) { 165 com.sleepycat.util.ErrorBuffer ebuf = (com.sleepycat.util.ErrorBuffer)errBuf.get(); 166 String ret = null; 167 if (ebuf != null) { 168 ret = ebuf.get(); 169 ebuf.clear(); 170 } 171 if (ret != null && ret.length() > 0) 172 return orig_msg + ": " + ret; 173 return orig_msg; 174 } 175 176 public ErrorHandler get_errcall() /* no exception */ { 177 return error_handler; 178 } 179 180 private final void handle_message(String msg) { 181 message_handler.message(wrapper, msg); 182 } 183 184 public MessageHandler get_msgcall() /* no exception */ { 185 return message_handler; 186 } 187 188 private final void handle_panic(DatabaseException e) { 189 panic_handler.panic(wrapper, e); 190 } 191 192 public PanicHandler get_paniccall() throws com.sleepycat.db.DatabaseException { 193 return panic_handler; 194 } 195 196 private final int handle_rep_transport(DatabaseEntry control, 197 DatabaseEntry rec, 198 LogSequenceNumber lsn, 199 int envid, int flags) 200 throws DatabaseException { 201 return rep_transport_handler.send(wrapper, 202 control, rec, lsn, envid, 203 (flags & DbConstants.DB_REP_NOBUFFER) != 0, 204 (flags & DbConstants.DB_REP_PERMANENT) != 0, 205 (flags & DbConstants.DB_REP_ANYWHERE) != 0, 206 (flags & DbConstants.DB_REP_REREQUEST) != 0); 207 } 208 209 public void lock_vec(/*u_int32_t*/ int locker, int flags, 210 LockRequest[] list, int offset, int count) 211 throws DatabaseException { 212 db_javaJNI.DbEnv_lock_vec(swigCPtr, this, locker, flags, list, 213 offset, count); 214 } 215 216 public synchronized void remove(String db_home, int flags) 217 throws DatabaseException, java.io.FileNotFoundException { 218 try { 219 remove0(db_home, flags); 220 } finally { 221 cleanup(); 222 } 223 } 224 225 public void set_error_stream(java.io.OutputStream stream) /* no exception */ { 226 error_stream = stream; 227 final java.io.PrintWriter pw = new java.io.PrintWriter(stream); 228 set_errcall(new ErrorHandler() { 229 public void error(Environment env, 230 String prefix, String buf) /* no exception */ { 231 if (prefix != null) 232 pw.print(prefix + ": "); 233 pw.println(buf); 234 pw.flush(); 235 } 236 }); 237 } 238 239 public java.io.OutputStream get_error_stream() /* no exception */ { 240 return error_stream; 241 } 242 243 public void set_message_stream(java.io.OutputStream stream) /* no exception */ { 244 message_stream = stream; 245 final java.io.PrintWriter pw = new java.io.PrintWriter(stream); 246 set_msgcall(new MessageHandler() { 247 public void message(Environment env, String msg) /* no exception */ 248 /* no exception */ { 249 pw.println(msg); 250 pw.flush(); 251 } 252 }); 253 } 254 255 public java.io.OutputStream get_message_stream() /* no exception */ { 256 return message_stream; 257 } 258 259 public void set_tx_timestamp(java.util.Date timestamp) throws com.sleepycat.db.DatabaseException { 260 set_tx_timestamp0(timestamp.getTime()/1000); 261 } 262 263 public DbEnv(int flags) throws com.sleepycat.db.DatabaseException { 264 this(db_javaJNI.new_DbEnv(flags), true); 265 initialize(); 266 } 267 268 /* package */ void close0(int flags) { db_javaJNI.DbEnv_close0(swigCPtr, this, flags); } 269 270 public void dbremove(DbTxn txnid, String file, String database, int flags) throws com.sleepycat.db.DatabaseException, java.io.FileNotFoundException { db_javaJNI.DbEnv_dbremove(swigCPtr, this, DbTxn.getCPtr(txnid), txnid, file, database, flags); } 271 272 public void dbrename(DbTxn txnid, String file, String database, String newname, int flags) throws com.sleepycat.db.DatabaseException, java.io.FileNotFoundException { db_javaJNI.DbEnv_dbrename(swigCPtr, this, DbTxn.getCPtr(txnid), txnid, file, database, newname, flags); } 273 274 public void err(int error, String message) /* no exception */ { 275 db_javaJNI.DbEnv_err(swigCPtr, this, error, message); 276 } 277 278 public void errx(String message) /* no exception */ { 279 db_javaJNI.DbEnv_errx(swigCPtr, this, message); 280 } 281 282 public DbTxn cdsgroup_begin() throws com.sleepycat.db.DatabaseException { 283 long cPtr = db_javaJNI.DbEnv_cdsgroup_begin(swigCPtr, this); 284 return (cPtr == 0) ? null : new DbTxn(cPtr, false); 285 } 286 287 public void fileid_reset(String file, int flags) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbEnv_fileid_reset(swigCPtr, this, file, flags); } 288 289 public String[] get_data_dirs() throws com.sleepycat.db.DatabaseException { return db_javaJNI.DbEnv_get_data_dirs(swigCPtr, this); } 290 291 public int get_encrypt_flags() throws com.sleepycat.db.DatabaseException { return db_javaJNI.DbEnv_get_encrypt_flags(swigCPtr, this); } 292 293 public int get_flags() throws com.sleepycat.db.DatabaseException { return db_javaJNI.DbEnv_get_flags(swigCPtr, this); } 294 295 public String get_home() throws com.sleepycat.db.DatabaseException { 296 return db_javaJNI.DbEnv_get_home(swigCPtr, this); 297 } 298 299 public String get_intermediate_dir_mode() throws com.sleepycat.db.DatabaseException { 300 return db_javaJNI.DbEnv_get_intermediate_dir_mode(swigCPtr, this); 301 } 302 303 public int get_open_flags() throws com.sleepycat.db.DatabaseException { return db_javaJNI.DbEnv_get_open_flags(swigCPtr, this); } 304 305 public long get_shm_key() throws com.sleepycat.db.DatabaseException { return db_javaJNI.DbEnv_get_shm_key(swigCPtr, this); } 306 307 public String get_tmp_dir() throws com.sleepycat.db.DatabaseException { 308 return db_javaJNI.DbEnv_get_tmp_dir(swigCPtr, this); 309 } 310 311 public boolean get_verbose(int which) throws com.sleepycat.db.DatabaseException { return db_javaJNI.DbEnv_get_verbose(swigCPtr, this, which); } 312 313 public boolean is_bigendian() throws com.sleepycat.db.DatabaseException { return db_javaJNI.DbEnv_is_bigendian(swigCPtr, this); } 314 315 public void lsn_reset(String file, int flags) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbEnv_lsn_reset(swigCPtr, this, file, flags); } 316 317 public void open(String db_home, int flags, int mode) throws com.sleepycat.db.DatabaseException, java.io.FileNotFoundException { db_javaJNI.DbEnv_open(swigCPtr, this, db_home, flags, mode); } 318 319 /* package */ void remove0(String db_home, int flags) { db_javaJNI.DbEnv_remove0(swigCPtr, this, db_home, flags); } 320 321 public void set_cachesize(long bytes, int ncache) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbEnv_set_cachesize(swigCPtr, this, bytes, ncache); } 322 323 public void set_cache_max(long bytes) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbEnv_set_cache_max(swigCPtr, this, bytes); } 324 325 public void set_data_dir(String dir) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbEnv_set_data_dir(swigCPtr, this, dir); } 326 327 public void set_intermediate_dir_mode(String mode) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbEnv_set_intermediate_dir_mode(swigCPtr, this, mode); } 328 329 public void set_encrypt(String passwd, int flags) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbEnv_set_encrypt(swigCPtr, this, passwd, flags); } 330 331 public void set_errcall(com.sleepycat.db.ErrorHandler db_errcall_fcn) /* no exception */ { 332 db_javaJNI.DbEnv_set_errcall(swigCPtr, this, (error_handler = db_errcall_fcn) != null ); 333 } 334 335 public void set_flags(int flags, boolean onoff) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbEnv_set_flags(swigCPtr, this, flags, onoff); } 336 337 public void set_feedback(com.sleepycat.db.FeedbackHandler env_feedback_fcn) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbEnv_set_feedback(swigCPtr, this, (env_feedback_handler = env_feedback_fcn) != null ); } 338 339 public void set_mp_max_openfd(int maxopenfd) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbEnv_set_mp_max_openfd(swigCPtr, this, maxopenfd); } 340 341 public void set_mp_max_write(int maxwrite, long maxwrite_sleep) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbEnv_set_mp_max_write(swigCPtr, this, maxwrite, maxwrite_sleep); } 342 343 public void set_mp_mmapsize(long mp_mmapsize) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbEnv_set_mp_mmapsize(swigCPtr, this, mp_mmapsize); } 344 345 public void set_msgcall(com.sleepycat.db.MessageHandler db_msgcall_fcn) /* no exception */ { 346 db_javaJNI.DbEnv_set_msgcall(swigCPtr, this, (message_handler = db_msgcall_fcn) != null ); 347 } 348 349 public void set_paniccall(com.sleepycat.db.PanicHandler db_panic_fcn) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbEnv_set_paniccall(swigCPtr, this, (panic_handler = db_panic_fcn) != null ); } 350 351 public void set_rpc_server(String host, long cl_timeout, long sv_timeout, int flags) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbEnv_set_rpc_server(swigCPtr, this, host, cl_timeout, sv_timeout, flags); } 352 353 public void set_shm_key(long shm_key) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbEnv_set_shm_key(swigCPtr, this, shm_key); } 354 355 public void set_timeout(long timeout, int flags) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbEnv_set_timeout(swigCPtr, this, timeout, flags); } 356 357 public void set_tmp_dir(String dir) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbEnv_set_tmp_dir(swigCPtr, this, dir); } 358 359 public void set_tx_max(int max) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbEnv_set_tx_max(swigCPtr, this, max); } 360 361 public void set_app_dispatch(com.sleepycat.db.LogRecordHandler tx_recover) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbEnv_set_app_dispatch(swigCPtr, this, (app_dispatch_handler = tx_recover) != null ); } 362 363 public void set_event_notify(com.sleepycat.db.EventHandler event_notify) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbEnv_set_event_notify(swigCPtr, this, (event_notify_handler = event_notify) != null ); } 364 365 /* package */ void set_tx_timestamp0(long timestamp) { db_javaJNI.DbEnv_set_tx_timestamp0(swigCPtr, this, timestamp); } 366 367 public void set_verbose(int which, boolean onoff) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbEnv_set_verbose(swigCPtr, this, which, onoff); } 368 369 public byte[][] get_lk_conflicts() throws com.sleepycat.db.DatabaseException { return db_javaJNI.DbEnv_get_lk_conflicts(swigCPtr, this); } 370 371 public int get_lk_detect() throws com.sleepycat.db.DatabaseException { return db_javaJNI.DbEnv_get_lk_detect(swigCPtr, this); } 372 373 public int get_lk_max_locks() throws com.sleepycat.db.DatabaseException { return db_javaJNI.DbEnv_get_lk_max_locks(swigCPtr, this); } 374 375 public int get_lk_max_lockers() throws com.sleepycat.db.DatabaseException { return db_javaJNI.DbEnv_get_lk_max_lockers(swigCPtr, this); } 376 377 public int get_lk_max_objects() throws com.sleepycat.db.DatabaseException { return db_javaJNI.DbEnv_get_lk_max_objects(swigCPtr, this); } 378 379 public int lock_detect(int flags, int atype) throws com.sleepycat.db.DatabaseException { 380 return db_javaJNI.DbEnv_lock_detect(swigCPtr, this, flags, atype); 381 } 382 383 public DbLock lock_get(int locker, int flags, com.sleepycat.db.DatabaseEntry object, int lock_mode) throws com.sleepycat.db.DatabaseException { 384 long cPtr = db_javaJNI.DbEnv_lock_get(swigCPtr, this, locker, flags, object, lock_mode); 385 return (cPtr == 0) ? null : new DbLock(cPtr, true); 386 } 387 388 public int lock_id() throws com.sleepycat.db.DatabaseException { return db_javaJNI.DbEnv_lock_id(swigCPtr, this); } 389 390 public void lock_id_free(int id) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbEnv_lock_id_free(swigCPtr, this, id); } 391 392 public void lock_put(DbLock lock) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbEnv_lock_put(swigCPtr, this, DbLock.getCPtr(lock), lock); } 393 394 public com.sleepycat.db.LockStats lock_stat(int flags) throws com.sleepycat.db.DatabaseException { return db_javaJNI.DbEnv_lock_stat(swigCPtr, this, flags); } 395 396 public void set_lk_conflicts(byte[][] conflicts) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbEnv_set_lk_conflicts(swigCPtr, this, conflicts); } 397 398 public void set_lk_detect(int detect) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbEnv_set_lk_detect(swigCPtr, this, detect); } 399 400 public void set_lk_max_lockers(int max) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbEnv_set_lk_max_lockers(swigCPtr, this, max); } 401 402 public void set_lk_max_locks(int max) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbEnv_set_lk_max_locks(swigCPtr, this, max); } 403 404 public void set_lk_max_objects(int max) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbEnv_set_lk_max_objects(swigCPtr, this, max); } 405 406 public int get_lg_bsize() throws com.sleepycat.db.DatabaseException { return db_javaJNI.DbEnv_get_lg_bsize(swigCPtr, this); } 407 408 public String get_lg_dir() throws com.sleepycat.db.DatabaseException { 409 return db_javaJNI.DbEnv_get_lg_dir(swigCPtr, this); 410 } 411 412 public int get_lg_filemode() throws com.sleepycat.db.DatabaseException { 413 return db_javaJNI.DbEnv_get_lg_filemode(swigCPtr, this); 414 } 415 416 public int get_lg_max() throws com.sleepycat.db.DatabaseException { return db_javaJNI.DbEnv_get_lg_max(swigCPtr, this); } 417 418 public int get_lg_regionmax() throws com.sleepycat.db.DatabaseException { return db_javaJNI.DbEnv_get_lg_regionmax(swigCPtr, this); } 419 420 public String[] log_archive(int flags) throws com.sleepycat.db.DatabaseException { return db_javaJNI.DbEnv_log_archive(swigCPtr, this, flags); } 421 422 public static int log_compare(com.sleepycat.db.LogSequenceNumber lsn0, com.sleepycat.db.LogSequenceNumber lsn1) /* no exception */ { 423 return db_javaJNI.DbEnv_log_compare(lsn0, lsn1); 424 } 425 426 public DbLogc log_cursor(int flags) throws com.sleepycat.db.DatabaseException { 427 long cPtr = db_javaJNI.DbEnv_log_cursor(swigCPtr, this, flags); 428 return (cPtr == 0) ? null : new DbLogc(cPtr, true); 429 } 430 431 public String log_file(com.sleepycat.db.LogSequenceNumber lsn) throws com.sleepycat.db.DatabaseException { 432 return db_javaJNI.DbEnv_log_file(swigCPtr, this, lsn); 433 } 434 435 public void log_flush(com.sleepycat.db.LogSequenceNumber lsn_or_null) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbEnv_log_flush(swigCPtr, this, lsn_or_null); } 436 437 public boolean log_get_config(int which) throws com.sleepycat.db.DatabaseException { return db_javaJNI.DbEnv_log_get_config(swigCPtr, this, which); } 438 439 public void log_put(com.sleepycat.db.LogSequenceNumber lsn, com.sleepycat.db.DatabaseEntry data, int flags) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbEnv_log_put(swigCPtr, this, lsn, data, flags); } 440 441 public void log_print(DbTxn txn, String msg) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbEnv_log_print(swigCPtr, this, DbTxn.getCPtr(txn), txn, msg); } 442 443 public void log_set_config(int which, boolean onoff) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbEnv_log_set_config(swigCPtr, this, which, onoff); } 444 445 public com.sleepycat.db.LogStats log_stat(int flags) throws com.sleepycat.db.DatabaseException { return db_javaJNI.DbEnv_log_stat(swigCPtr, this, flags); } 446 447 public void set_lg_bsize(int lg_bsize) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbEnv_set_lg_bsize(swigCPtr, this, lg_bsize); } 448 449 public void set_lg_dir(String dir) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbEnv_set_lg_dir(swigCPtr, this, dir); } 450 451 public void set_lg_filemode(int mode) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbEnv_set_lg_filemode(swigCPtr, this, mode); } 452 453 public void set_lg_max(int lg_max) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbEnv_set_lg_max(swigCPtr, this, lg_max); } 454 455 public void set_lg_regionmax(int lg_regionmax) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbEnv_set_lg_regionmax(swigCPtr, this, lg_regionmax); } 456 457 public long get_cachesize() throws com.sleepycat.db.DatabaseException { 458 return db_javaJNI.DbEnv_get_cachesize(swigCPtr, this); 459 } 460 461 public int get_cachesize_ncache() throws com.sleepycat.db.DatabaseException { 462 return db_javaJNI.DbEnv_get_cachesize_ncache(swigCPtr, this); 463 } 464 465 public long get_cache_max() throws com.sleepycat.db.DatabaseException { 466 return db_javaJNI.DbEnv_get_cache_max(swigCPtr, this); 467 } 468 469 public int get_mp_max_openfd() throws com.sleepycat.db.DatabaseException { 470 return db_javaJNI.DbEnv_get_mp_max_openfd(swigCPtr, this); 471 } 472 473 public int get_mp_max_write() throws com.sleepycat.db.DatabaseException { 474 return db_javaJNI.DbEnv_get_mp_max_write(swigCPtr, this); 475 } 476 477 public long get_mp_max_write_sleep() throws com.sleepycat.db.DatabaseException { return db_javaJNI.DbEnv_get_mp_max_write_sleep(swigCPtr, this); } 478 479 public long get_mp_mmapsize() throws com.sleepycat.db.DatabaseException { return db_javaJNI.DbEnv_get_mp_mmapsize(swigCPtr, this); } 480 481 public com.sleepycat.db.CacheStats memp_stat(int flags) throws com.sleepycat.db.DatabaseException { return db_javaJNI.DbEnv_memp_stat(swigCPtr, this, flags); } 482 483 public com.sleepycat.db.CacheFileStats[] memp_fstat(int flags) throws com.sleepycat.db.DatabaseException { return db_javaJNI.DbEnv_memp_fstat(swigCPtr, this, flags); } 484 485 public int memp_trickle(int percent) throws com.sleepycat.db.DatabaseException { 486 return db_javaJNI.DbEnv_memp_trickle(swigCPtr, this, percent); 487 } 488 489 public int mutex_get_align() throws com.sleepycat.db.DatabaseException { return db_javaJNI.DbEnv_mutex_get_align(swigCPtr, this); } 490 491 public int mutex_get_increment() throws com.sleepycat.db.DatabaseException { return db_javaJNI.DbEnv_mutex_get_increment(swigCPtr, this); } 492 493 public int mutex_get_max() throws com.sleepycat.db.DatabaseException { return db_javaJNI.DbEnv_mutex_get_max(swigCPtr, this); } 494 495 public int mutex_get_tas_spins() throws com.sleepycat.db.DatabaseException { return db_javaJNI.DbEnv_mutex_get_tas_spins(swigCPtr, this); } 496 497 public void mutex_set_align(int align) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbEnv_mutex_set_align(swigCPtr, this, align); } 498 499 public void mutex_set_increment(int increment) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbEnv_mutex_set_increment(swigCPtr, this, increment); } 500 501 public void mutex_set_max(int mutex_max) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbEnv_mutex_set_max(swigCPtr, this, mutex_max); } 502 503 public void mutex_set_tas_spins(int tas_spins) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbEnv_mutex_set_tas_spins(swigCPtr, this, tas_spins); } 504 505 public com.sleepycat.db.MutexStats mutex_stat(int flags) throws com.sleepycat.db.DatabaseException { return db_javaJNI.DbEnv_mutex_stat(swigCPtr, this, flags); } 506 507 public int get_tx_max() throws com.sleepycat.db.DatabaseException { return db_javaJNI.DbEnv_get_tx_max(swigCPtr, this); } 508 509 public long get_tx_timestamp() throws com.sleepycat.db.DatabaseException { return db_javaJNI.DbEnv_get_tx_timestamp(swigCPtr, this); } 510 511 public long get_timeout(int flag) throws com.sleepycat.db.DatabaseException { return db_javaJNI.DbEnv_get_timeout(swigCPtr, this, flag); } 512 513 public DbTxn txn_begin(DbTxn parent, int flags) throws com.sleepycat.db.DatabaseException { 514 long cPtr = db_javaJNI.DbEnv_txn_begin(swigCPtr, this, DbTxn.getCPtr(parent), parent, flags); 515 return (cPtr == 0) ? null : new DbTxn(cPtr, false); 516 } 517 518 public void txn_checkpoint(int kbyte, int min, int flags) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbEnv_txn_checkpoint(swigCPtr, this, kbyte, min, flags); } 519 520 public com.sleepycat.db.PreparedTransaction[] txn_recover(int count, int flags) throws com.sleepycat.db.DatabaseException { return db_javaJNI.DbEnv_txn_recover(swigCPtr, this, count, flags); } 521 522 public com.sleepycat.db.TransactionStats txn_stat(int flags) throws com.sleepycat.db.DatabaseException { return db_javaJNI.DbEnv_txn_stat(swigCPtr, this, flags); } 523 524 public long rep_get_limit() throws com.sleepycat.db.DatabaseException { 525 return db_javaJNI.DbEnv_rep_get_limit(swigCPtr, this); 526 } 527 528 public void rep_elect(int nsites, int nvotes, int flags) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbEnv_rep_elect(swigCPtr, this, nsites, nvotes, flags); } 529 530 public int rep_process_message(com.sleepycat.db.DatabaseEntry control, com.sleepycat.db.DatabaseEntry rec, int envid, com.sleepycat.db.LogSequenceNumber ret_lsn) /* no exception */ { 531 return db_javaJNI.DbEnv_rep_process_message(swigCPtr, this, control, rec, envid, ret_lsn); 532 } 533 534 public void rep_flush() throws com.sleepycat.db.DatabaseException { db_javaJNI.DbEnv_rep_flush(swigCPtr, this); } 535 536 public void rep_set_config(int which, boolean onoff) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbEnv_rep_set_config(swigCPtr, this, which, onoff); } 537 538 public void rep_set_clockskew(int fast_clock, int slow_clock) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbEnv_rep_set_clockskew(swigCPtr, this, fast_clock, slow_clock); } 539 540 public int rep_get_clockskew_fast() throws com.sleepycat.db.DatabaseException { return db_javaJNI.DbEnv_rep_get_clockskew_fast(swigCPtr, this); } 541 542 public int rep_get_clockskew_slow() throws com.sleepycat.db.DatabaseException { return db_javaJNI.DbEnv_rep_get_clockskew_slow(swigCPtr, this); } 543 544 public void rep_start(com.sleepycat.db.DatabaseEntry cdata, int flags) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbEnv_rep_start(swigCPtr, this, cdata, flags); } 545 546 public void rep_sync(int flags) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbEnv_rep_sync(swigCPtr, this, flags); } 547 548 public boolean rep_get_config(int which) throws com.sleepycat.db.DatabaseException { return db_javaJNI.DbEnv_rep_get_config(swigCPtr, this, which); } 549 550 public com.sleepycat.db.ReplicationStats rep_stat(int flags) throws com.sleepycat.db.DatabaseException { return db_javaJNI.DbEnv_rep_stat(swigCPtr, this, flags); } 551 552 public void rep_set_limit(long bytes) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbEnv_rep_set_limit(swigCPtr, this, bytes); } 553 554 public int rep_get_request_min() throws com.sleepycat.db.DatabaseException { return db_javaJNI.DbEnv_rep_get_request_min(swigCPtr, this); } 555 556 public int rep_get_request_max() throws com.sleepycat.db.DatabaseException { return db_javaJNI.DbEnv_rep_get_request_max(swigCPtr, this); } 557 558 public void rep_set_request(int min, int max) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbEnv_rep_set_request(swigCPtr, this, min, max); } 559 560 public void rep_set_transport(int envid, com.sleepycat.db.ReplicationTransport send) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbEnv_rep_set_transport(swigCPtr, this, envid, (rep_transport_handler = send) != null ); } 561 562 public int rep_get_nsites() throws com.sleepycat.db.DatabaseException { return db_javaJNI.DbEnv_rep_get_nsites(swigCPtr, this); } 563 564 public int rep_get_priority() throws com.sleepycat.db.DatabaseException { return db_javaJNI.DbEnv_rep_get_priority(swigCPtr, this); } 565 566 public int rep_get_timeout(int which) throws com.sleepycat.db.DatabaseException { return db_javaJNI.DbEnv_rep_get_timeout(swigCPtr, this, which); } 567 568 public void rep_set_nsites(int number) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbEnv_rep_set_nsites(swigCPtr, this, number); } 569 570 public void rep_set_priority(int priority) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbEnv_rep_set_priority(swigCPtr, this, priority); } 571 572 public void rep_set_timeout(int which, long timeout) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbEnv_rep_set_timeout(swigCPtr, this, which, timeout); } 573 574 public int repmgr_add_remote_site(String host, int port, int flags) throws com.sleepycat.db.DatabaseException { 575 return db_javaJNI.DbEnv_repmgr_add_remote_site(swigCPtr, this, host, port, flags); 576 } 577 578 public void repmgr_get_ack_policy() throws com.sleepycat.db.DatabaseException { db_javaJNI.DbEnv_repmgr_get_ack_policy(swigCPtr, this); } 579 580 public void repmgr_set_ack_policy(int policy) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbEnv_repmgr_set_ack_policy(swigCPtr, this, policy); } 581 582 public void repmgr_set_local_site(String host, int port, int flags) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbEnv_repmgr_set_local_site(swigCPtr, this, host, port, flags); } 583 584 public com.sleepycat.db.ReplicationManagerSiteInfo[] repmgr_site_list() throws com.sleepycat.db.DatabaseException { return db_javaJNI.DbEnv_repmgr_site_list(swigCPtr, this); } 585 586 public void repmgr_start(int nthreads, int flags) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbEnv_repmgr_start(swigCPtr, this, nthreads, flags); } 587 588 public com.sleepycat.db.ReplicationManagerStats repmgr_stat(int flags) throws com.sleepycat.db.DatabaseException { return db_javaJNI.DbEnv_repmgr_stat(swigCPtr, this, flags); } 589 590 public static String strerror(int error) /* no exception */ { 591 return db_javaJNI.DbEnv_strerror(error); 592 } 593 594 public static int get_version_major() /* no exception */ { 595 return db_javaJNI.DbEnv_get_version_major(); 596 } 597 598 public static int get_version_minor() /* no exception */ { 599 return db_javaJNI.DbEnv_get_version_minor(); 600 } 601 602 public static int get_version_patch() /* no exception */ { 603 return db_javaJNI.DbEnv_get_version_patch(); 604 } 605 606 public static String get_version_string() /* no exception */ { 607 return db_javaJNI.DbEnv_get_version_string(); 608 } 609 610} 611