• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /netgear-WNDR4500-V1.0.1.40_1.0.68/ap/gpl/timemachine/db-4.7.25.NC/java/src/com/sleepycat/db/internal/
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 DbSequence {
15  private long swigCPtr;
16  protected boolean swigCMemOwn;
17
18  protected DbSequence(long cPtr, boolean cMemoryOwn) {
19    swigCMemOwn = cMemoryOwn;
20    swigCPtr = cPtr;
21  }
22
23  protected static long getCPtr(DbSequence 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	public Sequence wrapper;
36
37	public synchronized void close(int flags) throws DatabaseException {
38		try {
39			close0(flags);
40		} finally {
41			swigCPtr = 0;
42		}
43	}
44
45	public synchronized void remove(DbTxn txn, int flags)
46	    throws DatabaseException {
47		try {
48			remove0(txn, flags);
49		} finally {
50			swigCPtr = 0;
51		}
52	}
53
54  public DbSequence(Db db, int flags) throws com.sleepycat.db.DatabaseException {
55    this(db_javaJNI.new_DbSequence(Db.getCPtr(db), db, flags), true);
56  }
57
58  /* package */ void close0(int flags) { db_javaJNI.DbSequence_close0(swigCPtr, this, flags); }
59
60  public long get(DbTxn txnid, int delta, int flags) throws com.sleepycat.db.DatabaseException { return db_javaJNI.DbSequence_get(swigCPtr, this, DbTxn.getCPtr(txnid), txnid, delta, flags); }
61
62  public int get_cachesize() throws com.sleepycat.db.DatabaseException { return db_javaJNI.DbSequence_get_cachesize(swigCPtr, this); }
63
64  public Db get_db() throws com.sleepycat.db.DatabaseException {
65    long cPtr = db_javaJNI.DbSequence_get_db(swigCPtr, this);
66    return (cPtr == 0) ? null : new Db(cPtr, false);
67  }
68
69  public int get_flags() throws com.sleepycat.db.DatabaseException { return db_javaJNI.DbSequence_get_flags(swigCPtr, this); }
70
71  public void get_key(com.sleepycat.db.DatabaseEntry key) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbSequence_get_key(swigCPtr, this, key); }
72
73  public long get_range_min() throws com.sleepycat.db.DatabaseException { return db_javaJNI.DbSequence_get_range_min(swigCPtr, this); }
74
75  public long get_range_max() throws com.sleepycat.db.DatabaseException { return db_javaJNI.DbSequence_get_range_max(swigCPtr, this); }
76
77  public void initial_value(long val) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbSequence_initial_value(swigCPtr, this, val); }
78
79  public void open(DbTxn txnid, com.sleepycat.db.DatabaseEntry key, int flags) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbSequence_open(swigCPtr, this, DbTxn.getCPtr(txnid), txnid, key, flags); }
80
81  /* package */ void remove0(DbTxn txnid, int flags) { db_javaJNI.DbSequence_remove0(swigCPtr, this, DbTxn.getCPtr(txnid), txnid, flags); }
82
83  public void set_cachesize(int size) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbSequence_set_cachesize(swigCPtr, this, size); }
84
85  public void set_flags(int flags) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbSequence_set_flags(swigCPtr, this, flags); }
86
87  public void set_range(long min, long max) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbSequence_set_range(swigCPtr, this, min, max); }
88
89  public com.sleepycat.db.SequenceStats stat(int flags) throws com.sleepycat.db.DatabaseException { return db_javaJNI.DbSequence_stat(swigCPtr, this, flags); }
90
91}
92