1 /* ---------------------------------------------------------------------------- 2 * This file was automatically generated by SWIG (http://www.swig.org). 3 * Version 3.0.12 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 9 package com.sleepycat.db.internal; 10 11 import com.sleepycat.db.*; 12 import java.util.Comparator; 13 14 public class DbEnv { 15 private transient long swigCPtr; 16 protected transient boolean swigCMemOwn; 17 DbEnv(long cPtr, boolean cMemoryOwn)18 protected DbEnv(long cPtr, boolean cMemoryOwn) { 19 swigCMemOwn = cMemoryOwn; 20 swigCPtr = cPtr; 21 } 22 getCPtr(DbEnv obj)23 protected static long getCPtr(DbEnv obj) { 24 return (obj == null) ? 0 : obj.swigCPtr; 25 } 26 delete()27 /* package */ synchronized void delete() { 28 if (swigCPtr != 0) { 29 if (swigCMemOwn) { 30 swigCMemOwn = false; 31 throw new UnsupportedOperationException("C++ destructor does not have public access"); 32 } 33 swigCPtr = 0; 34 } 35 } 36 37 /* package */ static final int GIGABYTE = 1 << 30; 38 /* 39 * Internally, the JNI layer creates a global reference to each DbEnv, 40 * which can potentially be different to this. We keep a copy here so 41 * we can clean up after destructors. 42 */ 43 private long dbenv_ref; 44 public Environment wrapper; 45 46 private LogRecordHandler app_dispatch_handler; 47 private EventHandler event_notify_handler; 48 private FeedbackHandler env_feedback_handler; 49 private ErrorHandler error_handler; 50 private String errpfx; 51 private MessageHandler message_handler; 52 private String msgpfx; 53 private PanicHandler panic_handler; 54 private ReplicationViewHandler rep_view_handler; 55 private ReplicationManagerMessageDispatch repmgr_msg_dispatch_handler; 56 private ReplicationTransport rep_transport_handler; 57 private java.io.OutputStream error_stream; 58 private java.io.OutputStream message_stream; 59 private ThreadLocal errBuf; 60 /* 61 * Because of how SWIG creates things, we need 3 separate objects here. 62 * We will only ever use backup_open_handler, however. 63 */ 64 private BackupHandler backup_close_handler; 65 private BackupHandler backup_open_handler; 66 private BackupHandler backup_write_handler; 67 public static class RepProcessMessage { 68 public int envid; 69 } 70 71 /* 72 * Called by the public DbEnv constructor and for private environments 73 * by the Db constructor and by sub-slice environments. 74 */ initialize()75 void initialize() { 76 dbenv_ref = db_java.initDbEnvRef0(this, this); 77 errBuf = new ThreadLocal(); 78 /* Start with System.err as the default error stream. */ 79 set_error_stream(System.err); 80 set_message_stream(System.out); 81 } 82 83 84 /* Initialize a sub-slice environment. */ slice_init()85 public void slice_init() throws com.sleepycat.db.DatabaseException { 86 initialize(); 87 } 88 cleanup()89 void cleanup() { 90 swigCPtr = 0; 91 db_java.deleteRef0(dbenv_ref); 92 dbenv_ref = 0L; 93 } 94 close(int flags)95 public synchronized void close(int flags) throws DatabaseException { 96 try { 97 close0(flags); 98 } finally { 99 cleanup(); 100 } 101 } 102 handle_app_dispatch(DatabaseEntry dbt, LogSequenceNumber lsn, int recops)103 private final int handle_app_dispatch(DatabaseEntry dbt, 104 LogSequenceNumber lsn, 105 int recops) { 106 return app_dispatch_handler.handleLogRecord(wrapper, dbt, lsn, 107 RecoveryOperation.fromFlag(recops)); 108 } 109 get_app_dispatch()110 public LogRecordHandler get_app_dispatch() throws com.sleepycat.db.DatabaseException { 111 return app_dispatch_handler; 112 } 113 handle_panic_event_notify()114 private final void handle_panic_event_notify() { 115 event_notify_handler.handlePanicEvent(); 116 } 117 handle_rep_autotakeover_event_notify()118 private final void handle_rep_autotakeover_event_notify() { 119 event_notify_handler.handleRepAutoTakeoverEvent(); 120 } 121 handle_rep_autotakeover_failed_event_notify()122 private final void handle_rep_autotakeover_failed_event_notify() { 123 event_notify_handler.handleRepAutoTakeoverFailedEvent(); 124 } 125 handle_rep_client_event_notify()126 private final void handle_rep_client_event_notify() { 127 event_notify_handler.handleRepClientEvent(); 128 } 129 handle_rep_connect_broken_event_notify()130 private final void handle_rep_connect_broken_event_notify() { 131 event_notify_handler.handleRepConnectBrokenEvent(); 132 } 133 handle_rep_connect_established_event_notify()134 private final void handle_rep_connect_established_event_notify() { 135 event_notify_handler.handleRepConnectEstablishedEvent(); 136 } 137 handle_rep_connect_try_failed_event_notify()138 private final void handle_rep_connect_try_failed_event_notify() { 139 event_notify_handler.handleRepConnectTryFailedEvent(); 140 } 141 handle_rep_dupmaster_event_notify()142 private final void handle_rep_dupmaster_event_notify() { 143 event_notify_handler.handleRepDupmasterEvent(); 144 } 145 handle_rep_elected_event_notify()146 private final void handle_rep_elected_event_notify() { 147 event_notify_handler.handleRepElectedEvent(); 148 } 149 handle_rep_election_failed_event_notify()150 private final void handle_rep_election_failed_event_notify() { 151 event_notify_handler.handleRepElectionFailedEvent(); 152 } 153 handle_rep_init_done_event_notify()154 private final void handle_rep_init_done_event_notify() { 155 event_notify_handler.handleRepInitDoneEvent(); 156 } 157 handle_rep_inqueue_full_event_notify()158 private final void handle_rep_inqueue_full_event_notify() { 159 event_notify_handler.handleRepInQueueFullEvent(); 160 } 161 handle_rep_join_failure_event_notify()162 private final void handle_rep_join_failure_event_notify() { 163 event_notify_handler.handleRepJoinFailureEvent(); 164 } 165 handle_rep_local_site_removed_event_notify()166 private final void handle_rep_local_site_removed_event_notify() { 167 event_notify_handler.handleRepLocalSiteRemovedEvent(); 168 } 169 handle_rep_master_event_notify()170 private final void handle_rep_master_event_notify() { 171 event_notify_handler.handleRepMasterEvent(); 172 } 173 handle_rep_master_failure_event_notify()174 private final void handle_rep_master_failure_event_notify() { 175 event_notify_handler.handleRepMasterFailureEvent(); 176 } 177 handle_rep_new_master_event_notify(int envid)178 private final void handle_rep_new_master_event_notify(int envid) { 179 event_notify_handler.handleRepNewMasterEvent(envid); 180 } 181 handle_rep_perm_failed_event_notify()182 private final void handle_rep_perm_failed_event_notify() { 183 event_notify_handler.handleRepPermFailedEvent(); 184 } 185 handle_rep_site_added_event_notify()186 private final void handle_rep_site_added_event_notify() { 187 event_notify_handler.handleRepSiteAddedEvent(); 188 } 189 handle_rep_site_removed_event_notify()190 private final void handle_rep_site_removed_event_notify() { 191 event_notify_handler.handleRepSiteRemovedEvent(); 192 } 193 handle_rep_startup_done_event_notify()194 private final void handle_rep_startup_done_event_notify() { 195 event_notify_handler.handleRepStartupDoneEvent(); 196 } 197 handle_write_failed_event_notify(int errno)198 private final void handle_write_failed_event_notify(int errno) { 199 event_notify_handler.handleWriteFailedEvent(errno); 200 } 201 get_event_notify()202 public EventHandler get_event_notify() throws com.sleepycat.db.DatabaseException { 203 return event_notify_handler; 204 } 205 handle_env_feedback(int opcode, int percent)206 private final void handle_env_feedback(int opcode, int percent) { 207 if (opcode == DbConstants.DB_RECOVER) 208 env_feedback_handler.recoveryFeedback(wrapper, percent); 209 /* No other environment feedback type supported. */ 210 } 211 get_feedback()212 public FeedbackHandler get_feedback() throws com.sleepycat.db.DatabaseException { 213 return env_feedback_handler; 214 } 215 set_errpfx(String errpfx)216 public void set_errpfx(String errpfx) /* no exception */ { 217 this.errpfx = errpfx; 218 } 219 get_errpfx()220 public String get_errpfx() /* no exception */ { 221 return errpfx; 222 } 223 handle_error(String msg)224 private final void handle_error(String msg) { 225 com.sleepycat.util.ErrorBuffer ebuf = (com.sleepycat.util.ErrorBuffer)errBuf.get(); 226 if (ebuf == null) { 227 /* 228 * Populate the errBuf ThreadLocal on demand, since the 229 * callback can be made from different threads. 230 */ 231 ebuf = new com.sleepycat.util.ErrorBuffer(3); 232 errBuf.set(ebuf); 233 } 234 ebuf.append(msg); 235 error_handler.error(wrapper, this.errpfx, msg); 236 } 237 get_err_msg(String orig_msg)238 private final String get_err_msg(String orig_msg) { 239 com.sleepycat.util.ErrorBuffer ebuf = (com.sleepycat.util.ErrorBuffer)errBuf.get(); 240 String ret = null; 241 if (ebuf != null) { 242 ret = ebuf.get(); 243 ebuf.clear(); 244 } 245 if (ret != null && ret.length() > 0) 246 return orig_msg + ": " + ret; 247 return orig_msg; 248 } 249 get_errcall()250 public ErrorHandler get_errcall() /* no exception */ { 251 return error_handler; 252 } 253 set_msgpfx(String msgpfx)254 public void set_msgpfx(String msgpfx) /* no exception */ { 255 this.msgpfx = msgpfx; 256 } 257 get_msgpfx()258 public String get_msgpfx() /* no exception */ { 259 return msgpfx; 260 } 261 handle_message(String msg)262 private final void handle_message(String msg) { 263 message_handler.message(wrapper, this.msgpfx, msg); 264 } 265 handle_repmgr_message_dispatch(ReplicationChannel chan, DatabaseEntry[] msgs, int flags)266 private final void handle_repmgr_message_dispatch(ReplicationChannel chan, DatabaseEntry[] msgs, int flags) 267 throws DatabaseException { 268 java.util.List l = java.util.Arrays.asList(msgs); 269 java.util.Set msgSet = new java.util.HashSet(l); 270 boolean need_response = flags == DbConstants.DB_REPMGR_NEED_RESPONSE; 271 repmgr_msg_dispatch_handler.dispatch(chan, msgSet, need_response); 272 } 273 get_msgcall()274 public MessageHandler get_msgcall() /* no exception */ { 275 return message_handler; 276 } 277 handle_panic(DatabaseException e)278 private final void handle_panic(DatabaseException e) { 279 panic_handler.panic(wrapper, e); 280 } 281 get_paniccall()282 public PanicHandler get_paniccall() throws com.sleepycat.db.DatabaseException { 283 return panic_handler; 284 } 285 handle_rep_view(String name, int flags)286 public final boolean handle_rep_view(String name, int flags) throws com.sleepycat.db.DatabaseException { 287 return rep_view_handler.partial_view(wrapper, name, flags); 288 } 289 handle_rep_transport(DatabaseEntry control, DatabaseEntry rec, LogSequenceNumber lsn, int envid, int flags)290 private final int handle_rep_transport(DatabaseEntry control, 291 DatabaseEntry rec, 292 LogSequenceNumber lsn, 293 int envid, int flags) 294 throws DatabaseException { 295 return rep_transport_handler.send(wrapper, 296 control, rec, lsn, envid, 297 (flags & DbConstants.DB_REP_NOBUFFER) != 0, 298 (flags & DbConstants.DB_REP_PERMANENT) != 0, 299 (flags & DbConstants.DB_REP_ANYWHERE) != 0, 300 (flags & DbConstants.DB_REP_REREQUEST) != 0); 301 } 302 lock_vec( int locker, int flags, LockRequest[] list, int offset, int count)303 public void lock_vec(/*u_int32_t*/ int locker, int flags, 304 LockRequest[] list, int offset, int count) 305 throws DatabaseException { 306 db_javaJNI.DbEnv_lock_vec(swigCPtr, this, locker, flags, list, 307 offset, count); 308 } 309 remove(String db_home, int flags)310 public synchronized void remove(String db_home, int flags) 311 throws DatabaseException, java.io.FileNotFoundException { 312 try { 313 remove0(db_home, flags); 314 } finally { 315 cleanup(); 316 } 317 } 318 set_error_stream(java.io.OutputStream stream)319 public void set_error_stream(java.io.OutputStream stream) /* no exception */ { 320 error_stream = stream; 321 final java.io.PrintWriter pw = new java.io.PrintWriter(stream); 322 set_errcall(new ErrorHandler() { 323 public void error(Environment env, 324 String prefix, String buf) /* no exception */ { 325 if (prefix != null) 326 pw.print(prefix + ": "); 327 pw.println(buf); 328 pw.flush(); 329 } 330 }); 331 } 332 get_error_stream()333 public java.io.OutputStream get_error_stream() /* no exception */ { 334 return error_stream; 335 } 336 set_message_stream(java.io.OutputStream stream)337 public void set_message_stream(java.io.OutputStream stream) /* no exception */ { 338 message_stream = stream; 339 final java.io.PrintWriter pw = new java.io.PrintWriter(stream); 340 set_msgcall(new MessageHandler() { 341 public void message(Environment env, 342 String prefix, String buf) /* no exception */ { 343 if (prefix != null) 344 pw.print(prefix + ": "); 345 pw.println(buf); 346 pw.flush(); 347 } 348 }); 349 } 350 get_message_stream()351 public java.io.OutputStream get_message_stream() /* no exception */ { 352 return message_stream; 353 } 354 set_tx_timestamp(java.util.Date timestamp)355 public void set_tx_timestamp(java.util.Date timestamp) throws com.sleepycat.db.DatabaseException { 356 set_tx_timestamp0(timestamp.getTime()/1000); 357 } 358 359 /* 360 * See comment at top explaining why backup_open_handler is used 361 * for all 3 backup callbacks. 362 */ get_backup_handler()363 public BackupHandler get_backup_handler() throws com.sleepycat.db.DatabaseException { 364 return backup_open_handler; 365 } 366 handle_backup_close(String dbname)367 private final int handle_backup_close(String dbname) { 368 return backup_open_handler.close(dbname); 369 } 370 handle_backup_open(String dbname, String target)371 private final int handle_backup_open(String dbname, String target) { 372 return backup_open_handler.open(target, dbname); 373 } 374 handle_backup_write(int file_pos_gbytes, int file_pos_bytes, int len, byte[] buf)375 private final int handle_backup_write(int file_pos_gbytes, int file_pos_bytes, int len, byte[] buf) { 376 /* 377 * Offset in buf is always 0. We include it anyways to match 378 * the OutputStream.write() signature. 379 */ 380 long file_pos = file_pos_gbytes * GIGABYTE + file_pos_bytes; 381 return backup_open_handler.write(file_pos, buf, 0, len); 382 } 383 DbEnv(int flags)384 public DbEnv(int flags) throws com.sleepycat.db.DatabaseException { 385 this(db_javaJNI.new_DbEnv(flags), true); 386 initialize(); 387 } 388 close0(int flags)389 /* package */ void close0(int flags) { db_javaJNI.DbEnv_close0(swigCPtr, this, flags); } 390 dbremove(DbTxn txnid, String file, String database, int flags)391 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); } 392 dbrename(DbTxn txnid, String file, String database, String newname, int flags)393 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); } 394 err(int ret, String message)395 public void err(int ret, String message) /* no exception */ { 396 db_javaJNI.DbEnv_err(swigCPtr, this, ret, message); 397 } 398 errx(String message)399 public void errx(String message) /* no exception */ { 400 db_javaJNI.DbEnv_errx(swigCPtr, this, message); 401 } 402 get_slices()403 public DbEnv[] get_slices() throws com.sleepycat.db.DatabaseException { return db_javaJNI.DbEnv_get_slices(swigCPtr, this); } 404 cdsgroup_begin()405 public DbTxn cdsgroup_begin() throws com.sleepycat.db.DatabaseException { 406 long cPtr = db_javaJNI.DbEnv_cdsgroup_begin(swigCPtr, this); 407 return (cPtr == 0) ? null : new DbTxn(cPtr, false); 408 } 409 fileid_reset(String file, int flags)410 public void fileid_reset(String file, int flags) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbEnv_fileid_reset(swigCPtr, this, file, flags); } 411 get_data_dirs()412 public String[] get_data_dirs() throws com.sleepycat.db.DatabaseException { return db_javaJNI.DbEnv_get_data_dirs(swigCPtr, this); } 413 get_encrypt_flags()414 public int get_encrypt_flags() throws com.sleepycat.db.DatabaseException { return db_javaJNI.DbEnv_get_encrypt_flags(swigCPtr, this); } 415 get_ext_file_dir()416 public String get_ext_file_dir() throws com.sleepycat.db.DatabaseException { 417 return db_javaJNI.DbEnv_get_ext_file_dir(swigCPtr, this); 418 } 419 get_ext_file_threshold()420 public int get_ext_file_threshold() throws com.sleepycat.db.DatabaseException { return db_javaJNI.DbEnv_get_ext_file_threshold(swigCPtr, this); } 421 get_flags()422 public int get_flags() throws com.sleepycat.db.DatabaseException { return db_javaJNI.DbEnv_get_flags(swigCPtr, this); } 423 get_home()424 public String get_home() throws com.sleepycat.db.DatabaseException { 425 return db_javaJNI.DbEnv_get_home(swigCPtr, this); 426 } 427 get_intermediate_dir_mode()428 public String get_intermediate_dir_mode() throws com.sleepycat.db.DatabaseException { 429 return db_javaJNI.DbEnv_get_intermediate_dir_mode(swigCPtr, this); 430 } 431 get_open_flags()432 public int get_open_flags() throws com.sleepycat.db.DatabaseException { return db_javaJNI.DbEnv_get_open_flags(swigCPtr, this); } 433 get_metadata_dir()434 public String get_metadata_dir() throws com.sleepycat.db.DatabaseException { 435 return db_javaJNI.DbEnv_get_metadata_dir(swigCPtr, this); 436 } 437 get_shm_key()438 public long get_shm_key() throws com.sleepycat.db.DatabaseException { return db_javaJNI.DbEnv_get_shm_key(swigCPtr, this); } 439 get_slice_count()440 public int get_slice_count() throws com.sleepycat.db.DatabaseException { return db_javaJNI.DbEnv_get_slice_count(swigCPtr, this); } 441 get_tmp_dir()442 public String get_tmp_dir() throws com.sleepycat.db.DatabaseException { 443 return db_javaJNI.DbEnv_get_tmp_dir(swigCPtr, this); 444 } 445 get_verbose(int which)446 public boolean get_verbose(int which) throws com.sleepycat.db.DatabaseException { return db_javaJNI.DbEnv_get_verbose(swigCPtr, this, which); } 447 is_bigendian()448 public boolean is_bigendian() throws com.sleepycat.db.DatabaseException { return db_javaJNI.DbEnv_is_bigendian(swigCPtr, this); } 449 lsn_reset(String file, int flags)450 public void lsn_reset(String file, int flags) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbEnv_lsn_reset(swigCPtr, this, file, flags); } 451 open(String db_home, int flags, int mode)452 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); } 453 remove0(String db_home, int flags)454 /* package */ void remove0(String db_home, int flags) { db_javaJNI.DbEnv_remove0(swigCPtr, this, db_home, flags); } 455 set_cachesize(long bytes, int ncache)456 public void set_cachesize(long bytes, int ncache) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbEnv_set_cachesize(swigCPtr, this, bytes, ncache); } 457 set_cache_max(long bytes)458 public void set_cache_max(long bytes) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbEnv_set_cache_max(swigCPtr, this, bytes); } 459 set_create_dir(String dir)460 public void set_create_dir(String dir) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbEnv_set_create_dir(swigCPtr, this, dir); } 461 add_data_dir(String dir)462 public void add_data_dir(String dir) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbEnv_add_data_dir(swigCPtr, this, dir); } 463 set_intermediate_dir_mode(String mode)464 public void set_intermediate_dir_mode(String mode) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbEnv_set_intermediate_dir_mode(swigCPtr, this, mode); } 465 set_encrypt(String passwd, int flags)466 public void set_encrypt(String passwd, int flags) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbEnv_set_encrypt(swigCPtr, this, passwd, flags); } 467 set_errcall(com.sleepycat.db.ErrorHandler db_errcall_fcn)468 public void set_errcall(com.sleepycat.db.ErrorHandler db_errcall_fcn) /* no exception */ { 469 db_javaJNI.DbEnv_set_errcall(swigCPtr, this, (error_handler = db_errcall_fcn) != null ); 470 } 471 set_ext_file_dir(String dir)472 public void set_ext_file_dir(String dir) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbEnv_set_ext_file_dir(swigCPtr, this, dir); } 473 set_ext_file_threshold(int bytes, int flags)474 public void set_ext_file_threshold(int bytes, int flags) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbEnv_set_ext_file_threshold(swigCPtr, this, bytes, flags); } 475 set_flags(int flags, boolean onoff)476 public void set_flags(int flags, boolean onoff) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbEnv_set_flags(swigCPtr, this, flags, onoff); } 477 set_feedback(com.sleepycat.db.FeedbackHandler env_feedback_fcn)478 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 ); } 479 set_metadata_dir(String dir)480 public void set_metadata_dir(String dir) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbEnv_set_metadata_dir(swigCPtr, this, dir); } 481 set_mp_max_openfd(int maxopenfd)482 public void set_mp_max_openfd(int maxopenfd) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbEnv_set_mp_max_openfd(swigCPtr, this, maxopenfd); } 483 set_mp_max_write(int maxwrite, long maxwrite_sleep)484 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); } 485 set_mp_mmapsize(long mp_mmapsize)486 public void set_mp_mmapsize(long mp_mmapsize) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbEnv_set_mp_mmapsize(swigCPtr, this, mp_mmapsize); } 487 set_mp_pagesize(int mp_pagesize)488 public void set_mp_pagesize(int mp_pagesize) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbEnv_set_mp_pagesize(swigCPtr, this, mp_pagesize); } 489 set_mp_tablesize(int mp_tablesize)490 public void set_mp_tablesize(int mp_tablesize) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbEnv_set_mp_tablesize(swigCPtr, this, mp_tablesize); } 491 set_msgcall(com.sleepycat.db.MessageHandler db_msgcall_fcn)492 public void set_msgcall(com.sleepycat.db.MessageHandler db_msgcall_fcn) /* no exception */ { 493 db_javaJNI.DbEnv_set_msgcall(swigCPtr, this, (message_handler = db_msgcall_fcn) != null ); 494 } 495 set_msgfile(String msgfile)496 public int set_msgfile(String msgfile) /* no exception */ { 497 return db_javaJNI.DbEnv_set_msgfile(swigCPtr, this, msgfile); 498 } 499 set_paniccall(com.sleepycat.db.PanicHandler db_panic_fcn)500 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 ); } 501 set_shm_key(long shm_key)502 public void set_shm_key(long shm_key) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbEnv_set_shm_key(swigCPtr, this, shm_key); } 503 set_timeout(long timeout, int flags)504 public void set_timeout(long timeout, int flags) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbEnv_set_timeout(swigCPtr, this, timeout, flags); } 505 set_tmp_dir(String dir)506 public void set_tmp_dir(String dir) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbEnv_set_tmp_dir(swigCPtr, this, dir); } 507 set_tx_max(int max)508 public void set_tx_max(int max) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbEnv_set_tx_max(swigCPtr, this, max); } 509 set_app_dispatch(com.sleepycat.db.LogRecordHandler tx_recover)510 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 ); } 511 set_event_notify(com.sleepycat.db.EventHandler event_notify)512 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 ); } 513 set_tx_timestamp0(long timestamp)514 /* package */ void set_tx_timestamp0(long timestamp) { db_javaJNI.DbEnv_set_tx_timestamp0(swigCPtr, this, timestamp); } 515 set_verbose(int which, boolean onoff)516 public void set_verbose(int which, boolean onoff) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbEnv_set_verbose(swigCPtr, this, which, onoff); } 517 get_lk_conflicts()518 public byte[][] get_lk_conflicts() throws com.sleepycat.db.DatabaseException { return db_javaJNI.DbEnv_get_lk_conflicts(swigCPtr, this); } 519 get_lk_detect()520 public int get_lk_detect() throws com.sleepycat.db.DatabaseException { return db_javaJNI.DbEnv_get_lk_detect(swigCPtr, this); } 521 get_lk_max_locks()522 public int get_lk_max_locks() throws com.sleepycat.db.DatabaseException { return db_javaJNI.DbEnv_get_lk_max_locks(swigCPtr, this); } 523 get_lk_max_lockers()524 public int get_lk_max_lockers() throws com.sleepycat.db.DatabaseException { return db_javaJNI.DbEnv_get_lk_max_lockers(swigCPtr, this); } 525 get_lk_max_objects()526 public int get_lk_max_objects() throws com.sleepycat.db.DatabaseException { return db_javaJNI.DbEnv_get_lk_max_objects(swigCPtr, this); } 527 get_lk_partitions()528 public int get_lk_partitions() throws com.sleepycat.db.DatabaseException { return db_javaJNI.DbEnv_get_lk_partitions(swigCPtr, this); } 529 get_lk_priority(int lockerid)530 public int get_lk_priority(int lockerid) throws com.sleepycat.db.DatabaseException { return db_javaJNI.DbEnv_get_lk_priority(swigCPtr, this, lockerid); } 531 get_lk_tablesize()532 public int get_lk_tablesize() throws com.sleepycat.db.DatabaseException { return db_javaJNI.DbEnv_get_lk_tablesize(swigCPtr, this); } 533 get_memory_init(int config_type)534 public int get_memory_init(int config_type) throws com.sleepycat.db.DatabaseException { return db_javaJNI.DbEnv_get_memory_init(swigCPtr, this, config_type); } 535 get_memory_max()536 public long get_memory_max() throws com.sleepycat.db.DatabaseException { 537 return db_javaJNI.DbEnv_get_memory_max(swigCPtr, this); 538 } 539 lock_detect(int flags, int atype)540 public int lock_detect(int flags, int atype) throws com.sleepycat.db.DatabaseException { 541 return db_javaJNI.DbEnv_lock_detect(swigCPtr, this, flags, atype); 542 } 543 lock_get(int locker, int flags, com.sleepycat.db.DatabaseEntry object, int lock_mode)544 public DbLock lock_get(int locker, int flags, com.sleepycat.db.DatabaseEntry object, int lock_mode) throws com.sleepycat.db.DatabaseException { 545 long cPtr = db_javaJNI.DbEnv_lock_get(swigCPtr, this, locker, flags, object, lock_mode); 546 return (cPtr == 0) ? null : new DbLock(cPtr, true); 547 } 548 lock_id()549 public int lock_id() throws com.sleepycat.db.DatabaseException { return db_javaJNI.DbEnv_lock_id(swigCPtr, this); } 550 lock_id_free(int id)551 public void lock_id_free(int id) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbEnv_lock_id_free(swigCPtr, this, id); } 552 lock_put(DbLock lock)553 public void lock_put(DbLock lock) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbEnv_lock_put(swigCPtr, this, DbLock.getCPtr(lock), lock); } 554 lock_stat(int flags)555 public com.sleepycat.db.LockStats lock_stat(int flags) throws com.sleepycat.db.DatabaseException { return db_javaJNI.DbEnv_lock_stat(swigCPtr, this, flags); } 556 lock_stat_print(int flags)557 public int lock_stat_print(int flags) throws com.sleepycat.db.DatabaseException { 558 return db_javaJNI.DbEnv_lock_stat_print(swigCPtr, this, flags); 559 } 560 set_lk_conflicts(byte[][] conflicts)561 public void set_lk_conflicts(byte[][] conflicts) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbEnv_set_lk_conflicts(swigCPtr, this, conflicts); } 562 set_lk_detect(int detect)563 public void set_lk_detect(int detect) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbEnv_set_lk_detect(swigCPtr, this, detect); } 564 set_lk_max_lockers(int max)565 public void set_lk_max_lockers(int max) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbEnv_set_lk_max_lockers(swigCPtr, this, max); } 566 set_lk_max_locks(int max)567 public void set_lk_max_locks(int max) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbEnv_set_lk_max_locks(swigCPtr, this, max); } 568 set_lk_max_objects(int max)569 public void set_lk_max_objects(int max) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbEnv_set_lk_max_objects(swigCPtr, this, max); } 570 set_lk_partitions(int partitions)571 public void set_lk_partitions(int partitions) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbEnv_set_lk_partitions(swigCPtr, this, partitions); } 572 set_lk_priority(int lockerid, int priority)573 public void set_lk_priority(int lockerid, int priority) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbEnv_set_lk_priority(swigCPtr, this, lockerid, priority); } 574 set_lk_tablesize(int size)575 public void set_lk_tablesize(int size) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbEnv_set_lk_tablesize(swigCPtr, this, size); } 576 set_memory_init(int config_type, int value)577 public void set_memory_init(int config_type, int value) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbEnv_set_memory_init(swigCPtr, this, config_type, value); } 578 set_memory_max(long bytes)579 public void set_memory_max(long bytes) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbEnv_set_memory_max(swigCPtr, this, bytes); } 580 get_lg_bsize()581 public int get_lg_bsize() throws com.sleepycat.db.DatabaseException { return db_javaJNI.DbEnv_get_lg_bsize(swigCPtr, this); } 582 get_lg_dir()583 public String get_lg_dir() throws com.sleepycat.db.DatabaseException { 584 return db_javaJNI.DbEnv_get_lg_dir(swigCPtr, this); 585 } 586 get_lg_filemode()587 public int get_lg_filemode() throws com.sleepycat.db.DatabaseException { 588 return db_javaJNI.DbEnv_get_lg_filemode(swigCPtr, this); 589 } 590 get_lg_max()591 public int get_lg_max() throws com.sleepycat.db.DatabaseException { return db_javaJNI.DbEnv_get_lg_max(swigCPtr, this); } 592 get_lg_regionmax()593 public int get_lg_regionmax() throws com.sleepycat.db.DatabaseException { return db_javaJNI.DbEnv_get_lg_regionmax(swigCPtr, this); } 594 log_archive(int flags)595 public String[] log_archive(int flags) throws com.sleepycat.db.DatabaseException { return db_javaJNI.DbEnv_log_archive(swigCPtr, this, flags); } 596 log_compare(com.sleepycat.db.LogSequenceNumber lsn0, com.sleepycat.db.LogSequenceNumber lsn1)597 public static int log_compare(com.sleepycat.db.LogSequenceNumber lsn0, com.sleepycat.db.LogSequenceNumber lsn1) /* no exception */ { 598 return db_javaJNI.DbEnv_log_compare(lsn0, lsn1); 599 } 600 log_cursor(int flags)601 public DbLogc log_cursor(int flags) throws com.sleepycat.db.DatabaseException { 602 long cPtr = db_javaJNI.DbEnv_log_cursor(swigCPtr, this, flags); 603 return (cPtr == 0) ? null : new DbLogc(cPtr, true); 604 } 605 log_file(com.sleepycat.db.LogSequenceNumber lsn)606 public String log_file(com.sleepycat.db.LogSequenceNumber lsn) throws com.sleepycat.db.DatabaseException { 607 return db_javaJNI.DbEnv_log_file(swigCPtr, this, lsn); 608 } 609 log_flush(com.sleepycat.db.LogSequenceNumber lsn_or_null)610 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); } 611 log_get_config(int which)612 public boolean log_get_config(int which) throws com.sleepycat.db.DatabaseException { return db_javaJNI.DbEnv_log_get_config(swigCPtr, this, which); } 613 log_put(com.sleepycat.db.LogSequenceNumber lsn, com.sleepycat.db.DatabaseEntry data, int flags)614 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); } 615 log_print(DbTxn txn, String msg)616 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); } 617 log_set_config(int which, boolean onoff)618 public void log_set_config(int which, boolean onoff) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbEnv_log_set_config(swigCPtr, this, which, onoff); } 619 log_stat(int flags)620 public com.sleepycat.db.LogStats log_stat(int flags) throws com.sleepycat.db.DatabaseException { return db_javaJNI.DbEnv_log_stat(swigCPtr, this, flags); } 621 log_stat_print(int flags)622 public int log_stat_print(int flags) throws com.sleepycat.db.DatabaseException { 623 return db_javaJNI.DbEnv_log_stat_print(swigCPtr, this, flags); 624 } 625 log_verify(String envhome, int cachesz, String dbfile, String dbname, long stime, long etime, int stfile, int stoffset, int efile, int eoffset, int caf, int verbose)626 public int log_verify(String envhome, int cachesz, String dbfile, String dbname, long stime, long etime, int stfile, int stoffset, int efile, int eoffset, int caf, int verbose) throws com.sleepycat.db.DatabaseException { 627 return db_javaJNI.DbEnv_log_verify(swigCPtr, this, envhome, cachesz, dbfile, dbname, stime, etime, stfile, stoffset, efile, eoffset, caf, verbose); 628 } 629 set_lg_bsize(int lg_bsize)630 public void set_lg_bsize(int lg_bsize) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbEnv_set_lg_bsize(swigCPtr, this, lg_bsize); } 631 set_lg_dir(String dir)632 public void set_lg_dir(String dir) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbEnv_set_lg_dir(swigCPtr, this, dir); } 633 set_lg_filemode(int mode)634 public void set_lg_filemode(int mode) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbEnv_set_lg_filemode(swigCPtr, this, mode); } 635 set_lg_max(int lg_max)636 public void set_lg_max(int lg_max) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbEnv_set_lg_max(swigCPtr, this, lg_max); } 637 set_lg_regionmax(int lg_regionmax)638 public void set_lg_regionmax(int lg_regionmax) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbEnv_set_lg_regionmax(swigCPtr, this, lg_regionmax); } 639 get_cachesize()640 public long get_cachesize() throws com.sleepycat.db.DatabaseException { 641 return db_javaJNI.DbEnv_get_cachesize(swigCPtr, this); 642 } 643 get_cachesize_ncache()644 public int get_cachesize_ncache() throws com.sleepycat.db.DatabaseException { 645 return db_javaJNI.DbEnv_get_cachesize_ncache(swigCPtr, this); 646 } 647 get_cache_max()648 public long get_cache_max() throws com.sleepycat.db.DatabaseException { 649 return db_javaJNI.DbEnv_get_cache_max(swigCPtr, this); 650 } 651 get_create_dir()652 public String get_create_dir() throws com.sleepycat.db.DatabaseException { 653 return db_javaJNI.DbEnv_get_create_dir(swigCPtr, this); 654 } 655 get_mp_max_openfd()656 public int get_mp_max_openfd() throws com.sleepycat.db.DatabaseException { 657 return db_javaJNI.DbEnv_get_mp_max_openfd(swigCPtr, this); 658 } 659 get_mp_max_write()660 public int get_mp_max_write() throws com.sleepycat.db.DatabaseException { 661 return db_javaJNI.DbEnv_get_mp_max_write(swigCPtr, this); 662 } 663 get_mp_max_write_sleep()664 public long get_mp_max_write_sleep() throws com.sleepycat.db.DatabaseException { return db_javaJNI.DbEnv_get_mp_max_write_sleep(swigCPtr, this); } 665 get_mp_mmapsize()666 public long get_mp_mmapsize() throws com.sleepycat.db.DatabaseException { return db_javaJNI.DbEnv_get_mp_mmapsize(swigCPtr, this); } 667 get_mp_pagesize()668 public int get_mp_pagesize() throws com.sleepycat.db.DatabaseException { 669 return db_javaJNI.DbEnv_get_mp_pagesize(swigCPtr, this); 670 } 671 get_mp_tablesize()672 public int get_mp_tablesize() throws com.sleepycat.db.DatabaseException { 673 return db_javaJNI.DbEnv_get_mp_tablesize(swigCPtr, this); 674 } 675 memp_stat(int flags)676 public com.sleepycat.db.CacheStats memp_stat(int flags) throws com.sleepycat.db.DatabaseException { return db_javaJNI.DbEnv_memp_stat(swigCPtr, this, flags); } 677 memp_stat_print(int flags)678 public int memp_stat_print(int flags) throws com.sleepycat.db.DatabaseException { 679 return db_javaJNI.DbEnv_memp_stat_print(swigCPtr, this, flags); 680 } 681 memp_fstat(int flags)682 public com.sleepycat.db.CacheFileStats[] memp_fstat(int flags) throws com.sleepycat.db.DatabaseException { return db_javaJNI.DbEnv_memp_fstat(swigCPtr, this, flags); } 683 memp_sync(com.sleepycat.db.LogSequenceNumber lsn_or_null)684 public void memp_sync(com.sleepycat.db.LogSequenceNumber lsn_or_null) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbEnv_memp_sync(swigCPtr, this, lsn_or_null); } 685 memp_trickle(int percent)686 public int memp_trickle(int percent) throws com.sleepycat.db.DatabaseException { 687 return db_javaJNI.DbEnv_memp_trickle(swigCPtr, this, percent); 688 } 689 mutex_get_align()690 public int mutex_get_align() throws com.sleepycat.db.DatabaseException { return db_javaJNI.DbEnv_mutex_get_align(swigCPtr, this); } 691 mutex_get_increment()692 public int mutex_get_increment() throws com.sleepycat.db.DatabaseException { return db_javaJNI.DbEnv_mutex_get_increment(swigCPtr, this); } 693 mutex_get_init()694 public int mutex_get_init() throws com.sleepycat.db.DatabaseException { return db_javaJNI.DbEnv_mutex_get_init(swigCPtr, this); } 695 mutex_get_max()696 public int mutex_get_max() throws com.sleepycat.db.DatabaseException { return db_javaJNI.DbEnv_mutex_get_max(swigCPtr, this); } 697 mutex_get_tas_spins()698 public int mutex_get_tas_spins() throws com.sleepycat.db.DatabaseException { return db_javaJNI.DbEnv_mutex_get_tas_spins(swigCPtr, this); } 699 mutex_set_align(int align)700 public void mutex_set_align(int align) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbEnv_mutex_set_align(swigCPtr, this, align); } 701 mutex_set_increment(int increment)702 public void mutex_set_increment(int increment) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbEnv_mutex_set_increment(swigCPtr, this, increment); } 703 mutex_set_init(int mutex_init)704 public void mutex_set_init(int mutex_init) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbEnv_mutex_set_init(swigCPtr, this, mutex_init); } 705 mutex_set_max(int mutex_max)706 public void mutex_set_max(int mutex_max) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbEnv_mutex_set_max(swigCPtr, this, mutex_max); } 707 mutex_set_tas_spins(int tas_spins)708 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); } 709 mutex_stat(int flags)710 public com.sleepycat.db.MutexStats mutex_stat(int flags) throws com.sleepycat.db.DatabaseException { return db_javaJNI.DbEnv_mutex_stat(swigCPtr, this, flags); } 711 mutex_stat_print(int flags)712 public int mutex_stat_print(int flags) throws com.sleepycat.db.DatabaseException { 713 return db_javaJNI.DbEnv_mutex_stat_print(swigCPtr, this, flags); 714 } 715 get_region_dir()716 public String get_region_dir() throws com.sleepycat.db.DatabaseException { 717 return db_javaJNI.DbEnv_get_region_dir(swigCPtr, this); 718 } 719 set_region_dir(String dir)720 public void set_region_dir(String dir) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbEnv_set_region_dir(swigCPtr, this, dir); } 721 get_tx_max()722 public int get_tx_max() throws com.sleepycat.db.DatabaseException { return db_javaJNI.DbEnv_get_tx_max(swigCPtr, this); } 723 get_tx_timestamp()724 public long get_tx_timestamp() throws com.sleepycat.db.DatabaseException { return db_javaJNI.DbEnv_get_tx_timestamp(swigCPtr, this); } 725 get_timeout(int flag)726 public long get_timeout(int flag) throws com.sleepycat.db.DatabaseException { return db_javaJNI.DbEnv_get_timeout(swigCPtr, this, flag); } 727 stat_print(int flags)728 public int stat_print(int flags) throws com.sleepycat.db.DatabaseException { 729 return db_javaJNI.DbEnv_stat_print(swigCPtr, this, flags); 730 } 731 txn_applied(byte[] token, int maxwait, int flags)732 public int txn_applied(byte[] token, int maxwait, int flags) throws com.sleepycat.db.DatabaseException { 733 return db_javaJNI.DbEnv_txn_applied(swigCPtr, this, token, maxwait, flags); 734 } 735 txn_begin(DbTxn parent, int flags)736 public DbTxn txn_begin(DbTxn parent, int flags) throws com.sleepycat.db.DatabaseException { 737 long cPtr = db_javaJNI.DbEnv_txn_begin(swigCPtr, this, DbTxn.getCPtr(parent), parent, flags); 738 return (cPtr == 0) ? null : new DbTxn(cPtr, false); 739 } 740 txn_checkpoint(int kbyte, int min, int flags)741 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); } 742 txn_recover(long count, long flags)743 public com.sleepycat.db.PreparedTransaction[] txn_recover(long count, long flags) throws com.sleepycat.db.DatabaseException { return db_javaJNI.DbEnv_txn_recover(swigCPtr, this, count, flags); } 744 txn_stat(int flags)745 public com.sleepycat.db.TransactionStats txn_stat(int flags) throws com.sleepycat.db.DatabaseException { return db_javaJNI.DbEnv_txn_stat(swigCPtr, this, flags); } 746 txn_stat_print(int flags)747 public int txn_stat_print(int flags) throws com.sleepycat.db.DatabaseException { 748 return db_javaJNI.DbEnv_txn_stat_print(swigCPtr, this, flags); 749 } 750 rep_get_limit()751 public long rep_get_limit() throws com.sleepycat.db.DatabaseException { 752 return db_javaJNI.DbEnv_rep_get_limit(swigCPtr, this); 753 } 754 rep_elect(int nsites, int nvotes, int flags)755 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); } 756 rep_process_message(com.sleepycat.db.DatabaseEntry control, com.sleepycat.db.DatabaseEntry rec, int envid, com.sleepycat.db.LogSequenceNumber ret_lsn)757 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 */ { 758 return db_javaJNI.DbEnv_rep_process_message(swigCPtr, this, control, rec, envid, ret_lsn); 759 } 760 rep_flush()761 public void rep_flush() throws com.sleepycat.db.DatabaseException { db_javaJNI.DbEnv_rep_flush(swigCPtr, this); } 762 rep_set_config(int which, boolean onoff)763 public void rep_set_config(int which, boolean onoff) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbEnv_rep_set_config(swigCPtr, this, which, onoff); } 764 rep_set_clockskew(int fast_clock, int slow_clock)765 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); } 766 rep_get_clockskew_fast()767 public int rep_get_clockskew_fast() throws com.sleepycat.db.DatabaseException { return db_javaJNI.DbEnv_rep_get_clockskew_fast(swigCPtr, this); } 768 rep_get_clockskew_slow()769 public int rep_get_clockskew_slow() throws com.sleepycat.db.DatabaseException { return db_javaJNI.DbEnv_rep_get_clockskew_slow(swigCPtr, this); } 770 rep_start(com.sleepycat.db.DatabaseEntry cdata, int flags)771 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); } 772 rep_sync(int flags)773 public void rep_sync(int flags) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbEnv_rep_sync(swigCPtr, this, flags); } 774 rep_get_config(int which)775 public boolean rep_get_config(int which) throws com.sleepycat.db.DatabaseException { return db_javaJNI.DbEnv_rep_get_config(swigCPtr, this, which); } 776 rep_stat(int flags)777 public com.sleepycat.db.ReplicationStats rep_stat(int flags) throws com.sleepycat.db.DatabaseException { return db_javaJNI.DbEnv_rep_stat(swigCPtr, this, flags); } 778 rep_stat_print(int flags)779 public int rep_stat_print(int flags) throws com.sleepycat.db.DatabaseException { 780 return db_javaJNI.DbEnv_rep_stat_print(swigCPtr, this, flags); 781 } 782 rep_set_limit(long bytes)783 public void rep_set_limit(long bytes) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbEnv_rep_set_limit(swigCPtr, this, bytes); } 784 rep_get_request_min()785 public int rep_get_request_min() throws com.sleepycat.db.DatabaseException { return db_javaJNI.DbEnv_rep_get_request_min(swigCPtr, this); } 786 rep_get_request_max()787 public int rep_get_request_max() throws com.sleepycat.db.DatabaseException { return db_javaJNI.DbEnv_rep_get_request_max(swigCPtr, this); } 788 repmgr_channel(int eid, int flags)789 public DbChannel repmgr_channel(int eid, int flags) throws com.sleepycat.db.DatabaseException { 790 long cPtr = db_javaJNI.DbEnv_repmgr_channel(swigCPtr, this, eid, flags); 791 return (cPtr == 0) ? null : new DbChannel(cPtr, false); 792 } 793 rep_set_request(int min, int max)794 public void rep_set_request(int min, int max) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbEnv_rep_set_request(swigCPtr, this, min, max); } 795 rep_set_transport(int envid, com.sleepycat.db.ReplicationTransport send)796 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 ); } 797 rep_set_view(com.sleepycat.db.ReplicationViewHandler rep_view_fcn)798 public void rep_set_view(com.sleepycat.db.ReplicationViewHandler rep_view_fcn) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbEnv_rep_set_view(swigCPtr, this, (rep_view_handler = rep_view_fcn) != null ); } 799 rep_get_nsites()800 public int rep_get_nsites() throws com.sleepycat.db.DatabaseException { return db_javaJNI.DbEnv_rep_get_nsites(swigCPtr, this); } 801 rep_get_priority()802 public int rep_get_priority() throws com.sleepycat.db.DatabaseException { return db_javaJNI.DbEnv_rep_get_priority(swigCPtr, this); } 803 rep_get_timeout(int which)804 public int rep_get_timeout(int which) throws com.sleepycat.db.DatabaseException { return db_javaJNI.DbEnv_rep_get_timeout(swigCPtr, this, which); } 805 rep_set_nsites(int number)806 public void rep_set_nsites(int number) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbEnv_rep_set_nsites(swigCPtr, this, number); } 807 rep_set_priority(int priority)808 public void rep_set_priority(int priority) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbEnv_rep_set_priority(swigCPtr, this, priority); } 809 rep_set_timeout(int which, long timeout)810 public void rep_set_timeout(int which, long timeout) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbEnv_rep_set_timeout(swigCPtr, this, which, timeout); } 811 repmgr_get_ack_policy()812 public int repmgr_get_ack_policy() throws com.sleepycat.db.DatabaseException { 813 return db_javaJNI.DbEnv_repmgr_get_ack_policy(swigCPtr, this); 814 } 815 repmgr_get_incoming_queue_max()816 public long repmgr_get_incoming_queue_max() throws com.sleepycat.db.DatabaseException { 817 return db_javaJNI.DbEnv_repmgr_get_incoming_queue_max(swigCPtr, this); 818 } 819 repmgr_local_site()820 public DbSite repmgr_local_site() throws com.sleepycat.db.DatabaseException { 821 long cPtr = db_javaJNI.DbEnv_repmgr_local_site(swigCPtr, this); 822 return (cPtr == 0) ? null : new DbSite(cPtr, false); 823 } 824 repmgr_set_ack_policy(int policy)825 public void repmgr_set_ack_policy(int policy) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbEnv_repmgr_set_ack_policy(swigCPtr, this, policy); } 826 repmgr_set_incoming_queue_max(long bytes)827 public void repmgr_set_incoming_queue_max(long bytes) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbEnv_repmgr_set_incoming_queue_max(swigCPtr, this, bytes); } 828 repmgr_set_ssl_config(int config_type, String value)829 public void repmgr_set_ssl_config(int config_type, String value) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbEnv_repmgr_set_ssl_config(swigCPtr, this, config_type, value); } 830 repmgr_site(String host, long port)831 public DbSite repmgr_site(String host, long port) throws com.sleepycat.db.DatabaseException { 832 long cPtr = db_javaJNI.DbEnv_repmgr_site(swigCPtr, this, host, port); 833 return (cPtr == 0) ? null : new DbSite(cPtr, false); 834 } 835 repmgr_site_by_eid(int eid)836 public DbSite repmgr_site_by_eid(int eid) throws com.sleepycat.db.DatabaseException { 837 long cPtr = db_javaJNI.DbEnv_repmgr_site_by_eid(swigCPtr, this, eid); 838 return (cPtr == 0) ? null : new DbSite(cPtr, false); 839 } 840 repmgr_set_dispatch(com.sleepycat.db.ReplicationManagerMessageDispatch dispatch, int flags)841 public void repmgr_set_dispatch(com.sleepycat.db.ReplicationManagerMessageDispatch dispatch, int flags) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbEnv_repmgr_set_dispatch(swigCPtr, this, (repmgr_msg_dispatch_handler = dispatch) != null , flags); } 842 repmgr_site_list()843 public com.sleepycat.db.ReplicationManagerSiteInfo[] repmgr_site_list() throws com.sleepycat.db.DatabaseException { return db_javaJNI.DbEnv_repmgr_site_list(swigCPtr, this); } 844 repmgr_start(int nthreads, int flags)845 public void repmgr_start(int nthreads, int flags) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbEnv_repmgr_start(swigCPtr, this, nthreads, flags); } 846 repmgr_stat(int flags)847 public com.sleepycat.db.ReplicationManagerStats repmgr_stat(int flags) throws com.sleepycat.db.DatabaseException { return db_javaJNI.DbEnv_repmgr_stat(swigCPtr, this, flags); } 848 repmgr_stat_print(int flags)849 public int repmgr_stat_print(int flags) throws com.sleepycat.db.DatabaseException { 850 return db_javaJNI.DbEnv_repmgr_stat_print(swigCPtr, this, flags); 851 } 852 get_backup_config(int config_type)853 public int get_backup_config(int config_type) throws com.sleepycat.db.DatabaseException { return db_javaJNI.DbEnv_get_backup_config(swigCPtr, this, config_type); } 854 backup(String target, int flags)855 public void backup(String target, int flags) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbEnv_backup(swigCPtr, this, target, flags); } 856 dbbackup(String dbfile, String target, int flags)857 public void dbbackup(String dbfile, String target, int flags) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbEnv_dbbackup(swigCPtr, this, dbfile, target, flags); } 858 set_backup_callbacks(com.sleepycat.db.BackupHandler backup_open_fcn, com.sleepycat.db.BackupHandler backup_write_fcn, com.sleepycat.db.BackupHandler backup_close_fcn)859 public void set_backup_callbacks(com.sleepycat.db.BackupHandler backup_open_fcn, com.sleepycat.db.BackupHandler backup_write_fcn, com.sleepycat.db.BackupHandler backup_close_fcn) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbEnv_set_backup_callbacks(swigCPtr, this, (backup_open_handler = backup_open_fcn) != null , (backup_write_handler = backup_write_fcn) != null , (backup_close_handler = backup_close_fcn) != null ); } 860 set_backup_config(int config_type, int value)861 public void set_backup_config(int config_type, int value) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbEnv_set_backup_config(swigCPtr, this, config_type, value); } 862 strerror(int ret)863 public static String strerror(int ret) /* no exception */ { 864 return db_javaJNI.DbEnv_strerror(ret); 865 } 866 get_version_family()867 public static int get_version_family() /* no exception */ { 868 return db_javaJNI.DbEnv_get_version_family(); 869 } 870 get_version_release()871 public static int get_version_release() /* no exception */ { 872 return db_javaJNI.DbEnv_get_version_release(); 873 } 874 get_version_major()875 public static int get_version_major() /* no exception */ { 876 return db_javaJNI.DbEnv_get_version_major(); 877 } 878 get_version_minor()879 public static int get_version_minor() /* no exception */ { 880 return db_javaJNI.DbEnv_get_version_minor(); 881 } 882 get_version_patch()883 public static int get_version_patch() /* no exception */ { 884 return db_javaJNI.DbEnv_get_version_patch(); 885 } 886 get_version_string()887 public static String get_version_string() /* no exception */ { 888 return db_javaJNI.DbEnv_get_version_string(); 889 } 890 get_version_full_string()891 public static String get_version_full_string() /* no exception */ { 892 return db_javaJNI.DbEnv_get_version_full_string(); 893 } 894 slices_enabled()895 public static int slices_enabled() throws com.sleepycat.db.DatabaseException { 896 return db_javaJNI.DbEnv_slices_enabled(); 897 } 898 899 } 900