1 /* ---------------------------------------------------------------------------- 2 * This file was automatically generated by SWIG (http://www.swig.org). 3 * Version 2.0.4 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 Db { 15 private long swigCPtr; 16 protected boolean swigCMemOwn; 17 Db(long cPtr, boolean cMemoryOwn)18 protected Db(long cPtr, boolean cMemoryOwn) { 19 swigCMemOwn = cMemoryOwn; 20 swigCPtr = cPtr; 21 } 22 getCPtr(Db obj)23 protected static long getCPtr(Db 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 Db, 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 db_ref; 44 private DbEnv dbenv; 45 private boolean private_dbenv; 46 47 public Database wrapper; 48 private RecordNumberAppender append_recno_handler; 49 private Comparator bt_compare_handler; 50 private BtreeCompressor bt_compress_handler; 51 private BtreeCompressor bt_decompress_handler; 52 private BtreePrefixCalculator bt_prefix_handler; 53 private Comparator dup_compare_handler; 54 private FeedbackHandler db_feedback_handler; 55 private Comparator h_compare_handler; 56 private Hasher h_hash_handler; 57 private PartitionHandler partition_handler; 58 private SecondaryKeyCreator seckey_create_handler; 59 private SecondaryMultiKeyCreator secmultikey_create_handler; 60 private ForeignKeyNullifier foreignkey_nullify_handler; 61 private ForeignMultiKeyNullifier foreignmultikey_nullify_handler; 62 63 /* Called by the Db constructor */ initialize(DbEnv dbenv)64 private void initialize(DbEnv dbenv) { 65 if (dbenv == null) { 66 private_dbenv = true; 67 dbenv = db_java.getDbEnv0(this); 68 dbenv.initialize(); 69 } 70 this.dbenv = dbenv; 71 db_ref = db_java.initDbRef0(this, this); 72 } 73 cleanup()74 private void cleanup() { 75 swigCPtr = 0; 76 db_java.deleteRef0(db_ref); 77 db_ref = 0L; 78 if (private_dbenv) 79 dbenv.cleanup(); 80 dbenv = null; 81 } 82 getPrivateDbEnv()83 public boolean getPrivateDbEnv() throws com.sleepycat.db.DatabaseException { 84 return private_dbenv; 85 } 86 close(int flags)87 public synchronized void close(int flags) throws DatabaseException { 88 try { 89 close0(flags); 90 } finally { 91 cleanup(); 92 } 93 } 94 get_env()95 public DbEnv get_env() throws DatabaseException { 96 return dbenv; 97 } 98 handle_append_recno(DatabaseEntry data, int recno)99 private final void handle_append_recno(DatabaseEntry data, int recno) 100 throws DatabaseException { 101 append_recno_handler.appendRecordNumber(wrapper, data, recno); 102 } 103 get_append_recno()104 public RecordNumberAppender get_append_recno() throws com.sleepycat.db.DatabaseException { 105 return append_recno_handler; 106 } 107 handle_bt_compare(byte[] arr1, byte[] arr2)108 private final int handle_bt_compare(byte[] arr1, byte[] arr2) { 109 return bt_compare_handler.compare(arr1, arr2); 110 } 111 handle_bt_compress(DatabaseEntry dbt1, DatabaseEntry dbt2, DatabaseEntry dbt3, DatabaseEntry dbt4, DatabaseEntry dbt5)112 private final int handle_bt_compress(DatabaseEntry dbt1, 113 DatabaseEntry dbt2, DatabaseEntry dbt3, DatabaseEntry dbt4, 114 DatabaseEntry dbt5) { 115 return bt_compress_handler.compress(wrapper, dbt1, dbt2, 116 dbt3, dbt4, dbt5) ? 0 : DbConstants.DB_BUFFER_SMALL; 117 } 118 handle_bt_decompress(DatabaseEntry dbt1, DatabaseEntry dbt2, DatabaseEntry dbt3, DatabaseEntry dbt4, DatabaseEntry dbt5)119 private final int handle_bt_decompress(DatabaseEntry dbt1, 120 DatabaseEntry dbt2, DatabaseEntry dbt3, DatabaseEntry dbt4, 121 DatabaseEntry dbt5) { 122 return bt_compress_handler.decompress(wrapper, dbt1, dbt2, 123 dbt3, dbt4, dbt5) ? 0 : DbConstants.DB_BUFFER_SMALL; 124 } 125 get_bt_compare()126 public Comparator get_bt_compare() throws com.sleepycat.db.DatabaseException { 127 return bt_compare_handler; 128 } 129 get_bt_compress()130 public BtreeCompressor get_bt_compress() throws com.sleepycat.db.DatabaseException { 131 return bt_compress_handler; 132 } 133 get_bt_decompress()134 public BtreeCompressor get_bt_decompress() throws com.sleepycat.db.DatabaseException { 135 return bt_decompress_handler; 136 } 137 handle_bt_prefix(DatabaseEntry dbt1, DatabaseEntry dbt2)138 private final int handle_bt_prefix(DatabaseEntry dbt1, 139 DatabaseEntry dbt2) { 140 return bt_prefix_handler.prefix(wrapper, dbt1, dbt2); 141 } 142 get_bt_prefix()143 public BtreePrefixCalculator get_bt_prefix() throws com.sleepycat.db.DatabaseException { 144 return bt_prefix_handler; 145 } 146 handle_db_feedback(int opcode, int percent)147 private final void handle_db_feedback(int opcode, int percent) { 148 if (opcode == DbConstants.DB_UPGRADE) 149 db_feedback_handler.upgradeFeedback(wrapper, percent); 150 else if (opcode == DbConstants.DB_VERIFY) 151 db_feedback_handler.upgradeFeedback(wrapper, percent); 152 /* No other database feedback types known. */ 153 } 154 get_feedback()155 public FeedbackHandler get_feedback() throws com.sleepycat.db.DatabaseException { 156 return db_feedback_handler; 157 } 158 handle_h_compare(byte[] arr1, byte[] arr2)159 private final int handle_h_compare(byte[] arr1, byte[] arr2) { 160 return h_compare_handler.compare(arr1, arr2); 161 } 162 get_h_compare()163 public Comparator get_h_compare() throws com.sleepycat.db.DatabaseException { 164 return h_compare_handler; 165 } 166 handle_dup_compare(byte[] arr1, byte[] arr2)167 private final int handle_dup_compare(byte[] arr1, byte[] arr2) { 168 return dup_compare_handler.compare(arr1, arr2); 169 } 170 get_dup_compare()171 public Comparator get_dup_compare() throws com.sleepycat.db.DatabaseException { 172 return dup_compare_handler; 173 } 174 handle_h_hash(byte[] data, int len)175 private final int handle_h_hash(byte[] data, int len) { 176 return h_hash_handler.hash(wrapper, data, len); 177 } 178 get_h_hash()179 public Hasher get_h_hash() throws com.sleepycat.db.DatabaseException { 180 return h_hash_handler; 181 } 182 handle_foreignkey_nullify( DatabaseEntry key, DatabaseEntry data, DatabaseEntry seckey)183 private final boolean handle_foreignkey_nullify( 184 DatabaseEntry key, 185 DatabaseEntry data, 186 DatabaseEntry seckey) 187 throws DatabaseException { 188 if (foreignmultikey_nullify_handler != null) 189 return foreignmultikey_nullify_handler.nullifyForeignKey( 190 (SecondaryDatabase)wrapper, key, data, seckey); 191 else 192 return foreignkey_nullify_handler.nullifyForeignKey( 193 (SecondaryDatabase)wrapper, data); 194 } 195 handle_seckey_create( DatabaseEntry key, DatabaseEntry data)196 private final DatabaseEntry[] handle_seckey_create( 197 DatabaseEntry key, 198 DatabaseEntry data) 199 throws DatabaseException { 200 201 if (secmultikey_create_handler != null) { 202 java.util.HashSet keySet = new java.util.HashSet(); 203 secmultikey_create_handler.createSecondaryKeys( 204 (SecondaryDatabase)wrapper, key, data, keySet); 205 if (!keySet.isEmpty()) 206 return (DatabaseEntry[])keySet.toArray( 207 new DatabaseEntry[keySet.size()]); 208 } else { 209 DatabaseEntry result = new DatabaseEntry(); 210 if (seckey_create_handler.createSecondaryKey( 211 (SecondaryDatabase)wrapper, key, data, result)) { 212 DatabaseEntry[] results = { result }; 213 return results; 214 } 215 } 216 217 return null; 218 } 219 get_seckey_create()220 public SecondaryKeyCreator get_seckey_create() throws com.sleepycat.db.DatabaseException { 221 return seckey_create_handler; 222 } 223 get_secmultikey_create()224 public SecondaryMultiKeyCreator get_secmultikey_create() throws com.sleepycat.db.DatabaseException { 225 return secmultikey_create_handler; 226 } 227 set_secmultikey_create( SecondaryMultiKeyCreator secmultikey_create_handler)228 public void set_secmultikey_create( 229 SecondaryMultiKeyCreator secmultikey_create_handler) { 230 this.secmultikey_create_handler = secmultikey_create_handler; 231 } 232 set_foreignmultikey_nullifier(ForeignMultiKeyNullifier nullify)233 public void set_foreignmultikey_nullifier(ForeignMultiKeyNullifier nullify){ 234 this.foreignmultikey_nullify_handler = nullify; 235 } 236 handle_partition(DatabaseEntry dbt1)237 private final int handle_partition(DatabaseEntry dbt1) { 238 return partition_handler.partition(wrapper, dbt1); 239 } 240 get_partition_callback()241 public PartitionHandler get_partition_callback() throws com.sleepycat.db.DatabaseException { 242 return partition_handler; 243 } 244 remove(String file, String database, int flags)245 public synchronized void remove(String file, String database, int flags) 246 throws DatabaseException, java.io.FileNotFoundException { 247 try { 248 remove0(file, database, flags); 249 } finally { 250 cleanup(); 251 } 252 } 253 rename(String file, String database, String newname, int flags)254 public synchronized void rename(String file, String database, 255 String newname, int flags) 256 throws DatabaseException, java.io.FileNotFoundException { 257 try { 258 rename0(file, database, newname, flags); 259 } finally { 260 cleanup(); 261 } 262 } 263 verify(String file, String database, java.io.OutputStream outfile, int flags)264 public synchronized boolean verify(String file, String database, 265 java.io.OutputStream outfile, int flags) 266 throws DatabaseException, java.io.FileNotFoundException { 267 try { 268 return verify0(file, database, outfile, flags); 269 } finally { 270 cleanup(); 271 } 272 } 273 get_errcall()274 public ErrorHandler get_errcall() /* no exception */ { 275 return dbenv.get_errcall(); 276 } 277 set_errcall(ErrorHandler db_errcall_fcn)278 public void set_errcall(ErrorHandler db_errcall_fcn) /* no exception */ { 279 dbenv.set_errcall(db_errcall_fcn); 280 } 281 get_error_stream()282 public java.io.OutputStream get_error_stream() /* no exception */ { 283 return dbenv.get_error_stream(); 284 } 285 set_error_stream(java.io.OutputStream stream)286 public void set_error_stream(java.io.OutputStream stream) /* no exception */ { 287 dbenv.set_error_stream(stream); 288 } 289 set_errpfx(String errpfx)290 public void set_errpfx(String errpfx) /* no exception */ { 291 dbenv.set_errpfx(errpfx); 292 } 293 get_errpfx()294 public String get_errpfx() /* no exception */ { 295 return dbenv.get_errpfx(); 296 } 297 get_message_stream()298 public java.io.OutputStream get_message_stream() /* no exception */ { 299 return dbenv.get_message_stream(); 300 } 301 set_message_stream(java.io.OutputStream stream)302 public void set_message_stream(java.io.OutputStream stream) /* no exception */ { 303 dbenv.set_message_stream(stream); 304 } 305 get_msgcall()306 public MessageHandler get_msgcall() /* no exception */ { 307 return dbenv.get_msgcall(); 308 } 309 set_msgcall(MessageHandler db_msgcall_fcn)310 public void set_msgcall(MessageHandler db_msgcall_fcn) /* no exception */ { 311 dbenv.set_msgcall(db_msgcall_fcn); 312 } 313 set_paniccall(PanicHandler db_panic_fcn)314 public void set_paniccall(PanicHandler db_panic_fcn) 315 throws DatabaseException { 316 dbenv.set_paniccall(db_panic_fcn); 317 } 318 get_paniccall()319 public PanicHandler get_paniccall() throws com.sleepycat.db.DatabaseException { 320 return dbenv.get_paniccall(); 321 } 322 Db(DbEnv dbenv, int flags)323 public Db(DbEnv dbenv, int flags) throws com.sleepycat.db.DatabaseException { 324 this(db_javaJNI.new_Db(DbEnv.getCPtr(dbenv), dbenv, flags), true); 325 initialize(dbenv); 326 } 327 associate(DbTxn txnid, Db secondary, com.sleepycat.db.SecondaryKeyCreator callback, int flags)328 public void associate(DbTxn txnid, Db secondary, com.sleepycat.db.SecondaryKeyCreator callback, int flags) throws com.sleepycat.db.DatabaseException { db_javaJNI.Db_associate(swigCPtr, this, DbTxn.getCPtr(txnid), txnid, Db.getCPtr(secondary), secondary, (secondary.seckey_create_handler = callback) != null || 329 (secondary.secmultikey_create_handler != null) , flags); } 330 associate_foreign(Db primary, com.sleepycat.db.ForeignKeyNullifier callback, int flags)331 public void associate_foreign(Db primary, com.sleepycat.db.ForeignKeyNullifier callback, int flags) throws com.sleepycat.db.DatabaseException { db_javaJNI.Db_associate_foreign(swigCPtr, this, Db.getCPtr(primary), primary, (primary.foreignkey_nullify_handler = callback) != null || 332 (primary.foreignmultikey_nullify_handler != null) , flags); } 333 compact(DbTxn txnid, com.sleepycat.db.DatabaseEntry start, com.sleepycat.db.DatabaseEntry stop, com.sleepycat.db.CompactStats c_data, int flags, com.sleepycat.db.DatabaseEntry end)334 public void compact(DbTxn txnid, com.sleepycat.db.DatabaseEntry start, com.sleepycat.db.DatabaseEntry stop, com.sleepycat.db.CompactStats c_data, int flags, com.sleepycat.db.DatabaseEntry end) throws com.sleepycat.db.DatabaseException { db_javaJNI.Db_compact(swigCPtr, this, DbTxn.getCPtr(txnid), txnid, start, stop, c_data, flags, end); } 335 close0(int flags)336 /* package */ int close0(int flags) { 337 return db_javaJNI.Db_close0(swigCPtr, this, flags); 338 } 339 cursor(DbTxn txnid, int flags)340 public Dbc cursor(DbTxn txnid, int flags) throws com.sleepycat.db.DatabaseException { 341 long cPtr = db_javaJNI.Db_cursor(swigCPtr, this, DbTxn.getCPtr(txnid), txnid, flags); 342 return (cPtr == 0) ? null : new Dbc(cPtr, false); 343 } 344 del(DbTxn txnid, com.sleepycat.db.DatabaseEntry key, int flags)345 public int del(DbTxn txnid, com.sleepycat.db.DatabaseEntry key, int flags) throws com.sleepycat.db.DatabaseException { 346 return db_javaJNI.Db_del(swigCPtr, this, DbTxn.getCPtr(txnid), txnid, key, flags); 347 } 348 err(int ret, String message)349 public void err(int ret, String message) /* no exception */ { 350 db_javaJNI.Db_err(swigCPtr, this, ret, message); 351 } 352 errx(String message)353 public void errx(String message) /* no exception */ { 354 db_javaJNI.Db_errx(swigCPtr, this, message); 355 } 356 exists(DbTxn txnid, com.sleepycat.db.DatabaseEntry key, int flags)357 public int exists(DbTxn txnid, com.sleepycat.db.DatabaseEntry key, int flags) throws com.sleepycat.db.DatabaseException { 358 return db_javaJNI.Db_exists(swigCPtr, this, DbTxn.getCPtr(txnid), txnid, key, flags); 359 } 360 get(DbTxn txnid, com.sleepycat.db.DatabaseEntry key, com.sleepycat.db.DatabaseEntry data, int flags)361 public int get(DbTxn txnid, com.sleepycat.db.DatabaseEntry key, com.sleepycat.db.DatabaseEntry data, int flags) throws com.sleepycat.db.DatabaseException { 362 return db_javaJNI.Db_get(swigCPtr, this, DbTxn.getCPtr(txnid), txnid, key, data, flags); 363 } 364 get_assoc_flags()365 public int get_assoc_flags() throws com.sleepycat.db.DatabaseException { return db_javaJNI.Db_get_assoc_flags(swigCPtr, this); } 366 get_byteswapped()367 public boolean get_byteswapped() throws com.sleepycat.db.DatabaseException { return db_javaJNI.Db_get_byteswapped(swigCPtr, this); } 368 get_cachesize()369 public long get_cachesize() throws com.sleepycat.db.DatabaseException { 370 return db_javaJNI.Db_get_cachesize(swigCPtr, this); 371 } 372 get_cachesize_ncache()373 public int get_cachesize_ncache() throws com.sleepycat.db.DatabaseException { return db_javaJNI.Db_get_cachesize_ncache(swigCPtr, this); } 374 get_create_dir()375 public String get_create_dir() throws com.sleepycat.db.DatabaseException { 376 return db_javaJNI.Db_get_create_dir(swigCPtr, this); 377 } 378 get_filename()379 public String get_filename() throws com.sleepycat.db.DatabaseException { 380 return db_javaJNI.Db_get_filename(swigCPtr, this); 381 } 382 get_dbname()383 public String get_dbname() throws com.sleepycat.db.DatabaseException { 384 return db_javaJNI.Db_get_dbname(swigCPtr, this); 385 } 386 get_encrypt_flags()387 public int get_encrypt_flags() throws com.sleepycat.db.DatabaseException { return db_javaJNI.Db_get_encrypt_flags(swigCPtr, this); } 388 get_flags()389 public int get_flags() throws com.sleepycat.db.DatabaseException { return db_javaJNI.Db_get_flags(swigCPtr, this); } 390 get_lk_exclusive()391 public int get_lk_exclusive() throws com.sleepycat.db.DatabaseException { 392 return db_javaJNI.Db_get_lk_exclusive(swigCPtr, this); 393 } 394 get_lorder()395 public int get_lorder() throws com.sleepycat.db.DatabaseException { 396 return db_javaJNI.Db_get_lorder(swigCPtr, this); 397 } 398 get_mpf()399 public DbMpoolFile get_mpf() throws com.sleepycat.db.DatabaseException { 400 long cPtr = db_javaJNI.Db_get_mpf(swigCPtr, this); 401 return (cPtr == 0) ? null : new DbMpoolFile(cPtr, false); 402 } 403 get_open_flags()404 public int get_open_flags() throws com.sleepycat.db.DatabaseException { return db_javaJNI.Db_get_open_flags(swigCPtr, this); } 405 get_pagesize()406 public int get_pagesize() throws com.sleepycat.db.DatabaseException { return db_javaJNI.Db_get_pagesize(swigCPtr, this); } 407 get_bt_minkey()408 public int get_bt_minkey() throws com.sleepycat.db.DatabaseException { return db_javaJNI.Db_get_bt_minkey(swigCPtr, this); } 409 get_heapsize()410 public long get_heapsize() throws com.sleepycat.db.DatabaseException { 411 return db_javaJNI.Db_get_heapsize(swigCPtr, this); 412 } 413 get_heap_regionsize()414 public int get_heap_regionsize() throws com.sleepycat.db.DatabaseException { return db_javaJNI.Db_get_heap_regionsize(swigCPtr, this); } 415 get_h_ffactor()416 public int get_h_ffactor() throws com.sleepycat.db.DatabaseException { return db_javaJNI.Db_get_h_ffactor(swigCPtr, this); } 417 get_h_nelem()418 public int get_h_nelem() throws com.sleepycat.db.DatabaseException { return db_javaJNI.Db_get_h_nelem(swigCPtr, this); } 419 get_re_delim()420 public int get_re_delim() throws com.sleepycat.db.DatabaseException { 421 return db_javaJNI.Db_get_re_delim(swigCPtr, this); 422 } 423 get_priority()424 public int get_priority() throws com.sleepycat.db.DatabaseException { 425 return db_javaJNI.Db_get_priority(swigCPtr, this); 426 } 427 get_partition_dirs()428 public String[] get_partition_dirs() throws com.sleepycat.db.DatabaseException { return db_javaJNI.Db_get_partition_dirs(swigCPtr, this); } 429 get_partition_keys()430 public com.sleepycat.db.DatabaseEntry get_partition_keys() throws com.sleepycat.db.DatabaseException { return db_javaJNI.Db_get_partition_keys(swigCPtr, this); } 431 get_partition_parts()432 public int get_partition_parts() throws com.sleepycat.db.DatabaseException { 433 return db_javaJNI.Db_get_partition_parts(swigCPtr, this); 434 } 435 get_re_len()436 public int get_re_len() throws com.sleepycat.db.DatabaseException { return db_javaJNI.Db_get_re_len(swigCPtr, this); } 437 get_re_pad()438 public int get_re_pad() throws com.sleepycat.db.DatabaseException { 439 return db_javaJNI.Db_get_re_pad(swigCPtr, this); 440 } 441 get_re_source()442 public String get_re_source() throws com.sleepycat.db.DatabaseException { 443 return db_javaJNI.Db_get_re_source(swigCPtr, this); 444 } 445 get_q_extentsize()446 public int get_q_extentsize() throws com.sleepycat.db.DatabaseException { return db_javaJNI.Db_get_q_extentsize(swigCPtr, this); } 447 get_multiple()448 public boolean get_multiple() throws com.sleepycat.db.DatabaseException { return db_javaJNI.Db_get_multiple(swigCPtr, this); } 449 get_transactional()450 public boolean get_transactional() throws com.sleepycat.db.DatabaseException { return db_javaJNI.Db_get_transactional(swigCPtr, this); } 451 get_type()452 public int get_type() throws com.sleepycat.db.DatabaseException { 453 return db_javaJNI.Db_get_type(swigCPtr, this); 454 } 455 join(Dbc[] curslist, int flags)456 public Dbc join(Dbc[] curslist, int flags) throws com.sleepycat.db.DatabaseException { 457 long cPtr = db_javaJNI.Db_join(swigCPtr, this, curslist, flags); 458 return (cPtr == 0) ? null : new Dbc(cPtr, true); 459 } 460 key_range(DbTxn txnid, com.sleepycat.db.DatabaseEntry key, com.sleepycat.db.KeyRange key_range, int flags)461 public void key_range(DbTxn txnid, com.sleepycat.db.DatabaseEntry key, com.sleepycat.db.KeyRange key_range, int flags) throws com.sleepycat.db.DatabaseException { db_javaJNI.Db_key_range(swigCPtr, this, DbTxn.getCPtr(txnid), txnid, key, key_range, flags); } 462 open(DbTxn txnid, String file, String database, int type, int flags, int mode)463 public void open(DbTxn txnid, String file, String database, int type, int flags, int mode) throws com.sleepycat.db.DatabaseException, java.io.FileNotFoundException { db_javaJNI.Db_open(swigCPtr, this, DbTxn.getCPtr(txnid), txnid, file, database, type, flags, mode); } 464 pget(DbTxn txnid, com.sleepycat.db.DatabaseEntry key, com.sleepycat.db.DatabaseEntry pkey, com.sleepycat.db.DatabaseEntry data, int flags)465 public int pget(DbTxn txnid, com.sleepycat.db.DatabaseEntry key, com.sleepycat.db.DatabaseEntry pkey, com.sleepycat.db.DatabaseEntry data, int flags) throws com.sleepycat.db.DatabaseException { 466 return db_javaJNI.Db_pget(swigCPtr, this, DbTxn.getCPtr(txnid), txnid, key, pkey, data, flags); 467 } 468 put(DbTxn txnid, com.sleepycat.db.DatabaseEntry key, com.sleepycat.db.DatabaseEntry db_put_data, int flags)469 public int put(DbTxn txnid, com.sleepycat.db.DatabaseEntry key, com.sleepycat.db.DatabaseEntry db_put_data, int flags) throws com.sleepycat.db.DatabaseException { 470 return db_javaJNI.Db_put(swigCPtr, this, DbTxn.getCPtr(txnid), txnid, key, db_put_data, flags); 471 } 472 remove0(String file, String database, int flags)473 /* package */ void remove0(String file, String database, int flags) { db_javaJNI.Db_remove0(swigCPtr, this, file, database, flags); } 474 rename0(String file, String database, String newname, int flags)475 /* package */ void rename0(String file, String database, String newname, int flags) { db_javaJNI.Db_rename0(swigCPtr, this, file, database, newname, flags); } 476 set_append_recno(com.sleepycat.db.RecordNumberAppender db_append_recno_fcn)477 public void set_append_recno(com.sleepycat.db.RecordNumberAppender db_append_recno_fcn) throws com.sleepycat.db.DatabaseException { db_javaJNI.Db_set_append_recno(swigCPtr, this, (append_recno_handler = db_append_recno_fcn) != null ); } 478 set_bt_compare(java.util.Comparator bt_compare_fcn)479 public void set_bt_compare(java.util.Comparator bt_compare_fcn) throws com.sleepycat.db.DatabaseException { db_javaJNI.Db_set_bt_compare(swigCPtr, this, (bt_compare_handler = bt_compare_fcn) != null ); } 480 set_bt_minkey(int bt_minkey)481 public void set_bt_minkey(int bt_minkey) throws com.sleepycat.db.DatabaseException { db_javaJNI.Db_set_bt_minkey(swigCPtr, this, bt_minkey); } 482 set_bt_compress(com.sleepycat.db.BtreeCompressor bt_compress_fcn, com.sleepycat.db.BtreeCompressor bt_decompress_fcn)483 public void set_bt_compress(com.sleepycat.db.BtreeCompressor bt_compress_fcn, com.sleepycat.db.BtreeCompressor bt_decompress_fcn) throws com.sleepycat.db.DatabaseException { db_javaJNI.Db_set_bt_compress(swigCPtr, this, (bt_compress_handler = bt_compress_fcn) != null , (bt_decompress_handler = bt_decompress_fcn) != null ); } 484 set_bt_prefix(com.sleepycat.db.BtreePrefixCalculator bt_prefix_fcn)485 public void set_bt_prefix(com.sleepycat.db.BtreePrefixCalculator bt_prefix_fcn) throws com.sleepycat.db.DatabaseException { db_javaJNI.Db_set_bt_prefix(swigCPtr, this, (bt_prefix_handler = bt_prefix_fcn) != null ); } 486 set_cachesize(long bytes, int ncache)487 public void set_cachesize(long bytes, int ncache) throws com.sleepycat.db.DatabaseException { db_javaJNI.Db_set_cachesize(swigCPtr, this, bytes, ncache); } 488 set_create_dir(String dir)489 public void set_create_dir(String dir) throws com.sleepycat.db.DatabaseException { db_javaJNI.Db_set_create_dir(swigCPtr, this, dir); } 490 set_dup_compare(java.util.Comparator dup_compare_fcn)491 public void set_dup_compare(java.util.Comparator dup_compare_fcn) throws com.sleepycat.db.DatabaseException { db_javaJNI.Db_set_dup_compare(swigCPtr, this, (dup_compare_handler = dup_compare_fcn) != null ); } 492 set_encrypt(String passwd, int flags)493 public void set_encrypt(String passwd, int flags) throws com.sleepycat.db.DatabaseException { db_javaJNI.Db_set_encrypt(swigCPtr, this, passwd, flags); } 494 set_feedback(com.sleepycat.db.FeedbackHandler db_feedback_fcn)495 public void set_feedback(com.sleepycat.db.FeedbackHandler db_feedback_fcn) throws com.sleepycat.db.DatabaseException { db_javaJNI.Db_set_feedback(swigCPtr, this, (db_feedback_handler = db_feedback_fcn) != null ); } 496 set_flags(int flags)497 public void set_flags(int flags) throws com.sleepycat.db.DatabaseException { db_javaJNI.Db_set_flags(swigCPtr, this, flags); } 498 set_heapsize(long bytes)499 public void set_heapsize(long bytes) throws com.sleepycat.db.DatabaseException { db_javaJNI.Db_set_heapsize(swigCPtr, this, bytes); } 500 set_heap_regionsize(int npages)501 public void set_heap_regionsize(int npages) throws com.sleepycat.db.DatabaseException { db_javaJNI.Db_set_heap_regionsize(swigCPtr, this, npages); } 502 set_h_compare(java.util.Comparator h_compare_fcn)503 public void set_h_compare(java.util.Comparator h_compare_fcn) throws com.sleepycat.db.DatabaseException { db_javaJNI.Db_set_h_compare(swigCPtr, this, (h_compare_handler = h_compare_fcn) != null ); } 504 set_h_ffactor(int h_ffactor)505 public void set_h_ffactor(int h_ffactor) throws com.sleepycat.db.DatabaseException { db_javaJNI.Db_set_h_ffactor(swigCPtr, this, h_ffactor); } 506 set_h_hash(com.sleepycat.db.Hasher h_hash_fcn)507 public void set_h_hash(com.sleepycat.db.Hasher h_hash_fcn) throws com.sleepycat.db.DatabaseException { db_javaJNI.Db_set_h_hash(swigCPtr, this, (h_hash_handler = h_hash_fcn) != null ); } 508 set_h_nelem(int h_nelem)509 public void set_h_nelem(int h_nelem) throws com.sleepycat.db.DatabaseException { db_javaJNI.Db_set_h_nelem(swigCPtr, this, h_nelem); } 510 set_lk_exclusive(int nowait)511 public void set_lk_exclusive(int nowait) throws com.sleepycat.db.DatabaseException { db_javaJNI.Db_set_lk_exclusive(swigCPtr, this, nowait); } 512 set_lorder(int lorder)513 public void set_lorder(int lorder) throws com.sleepycat.db.DatabaseException { db_javaJNI.Db_set_lorder(swigCPtr, this, lorder); } 514 set_pagesize(long pagesize)515 public void set_pagesize(long pagesize) throws com.sleepycat.db.DatabaseException { db_javaJNI.Db_set_pagesize(swigCPtr, this, pagesize); } 516 set_partition(int parts, com.sleepycat.db.DatabaseEntry keys, com.sleepycat.db.PartitionHandler db_partition_fcn)517 public void set_partition(int parts, com.sleepycat.db.DatabaseEntry keys, com.sleepycat.db.PartitionHandler db_partition_fcn) throws com.sleepycat.db.DatabaseException { db_javaJNI.Db_set_partition(swigCPtr, this, parts, keys, (partition_handler = db_partition_fcn) != null ); } 518 set_partition_dirs(String[] dirp)519 public void set_partition_dirs(String[] dirp) throws com.sleepycat.db.DatabaseException { db_javaJNI.Db_set_partition_dirs(swigCPtr, this, dirp); } 520 set_priority(int priority)521 public void set_priority(int priority) throws com.sleepycat.db.DatabaseException { db_javaJNI.Db_set_priority(swigCPtr, this, priority); } 522 set_re_delim(int re_delim)523 public void set_re_delim(int re_delim) throws com.sleepycat.db.DatabaseException { db_javaJNI.Db_set_re_delim(swigCPtr, this, re_delim); } 524 set_re_len(int re_len)525 public void set_re_len(int re_len) throws com.sleepycat.db.DatabaseException { db_javaJNI.Db_set_re_len(swigCPtr, this, re_len); } 526 set_re_pad(int re_pad)527 public void set_re_pad(int re_pad) throws com.sleepycat.db.DatabaseException { db_javaJNI.Db_set_re_pad(swigCPtr, this, re_pad); } 528 set_re_source(String source)529 public void set_re_source(String source) throws com.sleepycat.db.DatabaseException { db_javaJNI.Db_set_re_source(swigCPtr, this, source); } 530 set_q_extentsize(int extentsize)531 public void set_q_extentsize(int extentsize) throws com.sleepycat.db.DatabaseException { db_javaJNI.Db_set_q_extentsize(swigCPtr, this, extentsize); } 532 sort_multiple(com.sleepycat.db.DatabaseEntry key, com.sleepycat.db.DatabaseEntry data)533 public void sort_multiple(com.sleepycat.db.DatabaseEntry key, com.sleepycat.db.DatabaseEntry data) throws com.sleepycat.db.DatabaseException { db_javaJNI.Db_sort_multiple(swigCPtr, this, key, data); } 534 stat(DbTxn txnid, int flags)535 public Object stat(DbTxn txnid, int flags) throws com.sleepycat.db.DatabaseException { return db_javaJNI.Db_stat(swigCPtr, this, DbTxn.getCPtr(txnid), txnid, flags); } 536 sync(int flags)537 public void sync(int flags) throws com.sleepycat.db.DatabaseException { db_javaJNI.Db_sync(swigCPtr, this, flags); } 538 truncate(DbTxn txnid, int flags)539 public int truncate(DbTxn txnid, int flags) throws com.sleepycat.db.DatabaseException { 540 return db_javaJNI.Db_truncate(swigCPtr, this, DbTxn.getCPtr(txnid), txnid, flags); 541 } 542 upgrade(String file, int flags)543 public void upgrade(String file, int flags) throws com.sleepycat.db.DatabaseException { db_javaJNI.Db_upgrade(swigCPtr, this, file, flags); } 544 verify0(String file, String database, java.io.OutputStream outfile, int flags)545 /* package */ boolean verify0(String file, String database, java.io.OutputStream outfile, int flags) { return db_javaJNI.Db_verify0(swigCPtr, this, file, database, outfile, flags); } 546 547 } 548