summaryrefslogtreecommitdiff
path: root/lang/java/src/com/sleepycat/db/internal/DbChannel.java
blob: 33c9fab8303bc67eeec058eca94c336156d2bc1f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
/* ----------------------------------------------------------------------------
 * This file was automatically generated by SWIG (http://www.swig.org).
 * Version 2.0.12
 *
 * Do not make changes to this file unless you know what you are doing--modify
 * the SWIG interface file instead.
 * ----------------------------------------------------------------------------- */

package com.sleepycat.db.internal;

import com.sleepycat.db.*;
import java.util.Comparator;

public class DbChannel {
  private long swigCPtr;
  protected boolean swigCMemOwn;

  protected DbChannel(long cPtr, boolean cMemoryOwn) {
    swigCMemOwn = cMemoryOwn;
    swigCPtr = cPtr;
  }

  protected static long getCPtr(DbChannel obj) {
    return (obj == null) ? 0 : obj.swigCPtr;
  }

  /* package */ synchronized void delete() {
    if (swigCPtr != 0) {
      if (swigCMemOwn) {
        swigCMemOwn = false;
        throw new UnsupportedOperationException("C++ destructor does not have public access");
      }
      swigCPtr = 0;
    }
  }

	public synchronized void close(int flags) throws DatabaseException {
		try {
			close0(flags);
		} finally {
			swigCPtr = 0;
		}
	}

  /* package */ void close0(int flags) { db_javaJNI.DbChannel_close0(swigCPtr, this, flags); }

  public void send_repmsg(com.sleepycat.db.DatabaseEntry[] chan_msgs, int nmsg, int flags) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbChannel_send_repmsg(swigCPtr, this, chan_msgs, nmsg, flags); }

  public void send_request(com.sleepycat.db.DatabaseEntry[] chan_msgs, int nrequest, com.sleepycat.db.DatabaseEntry response, long timeout, int flags) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbChannel_send_request(swigCPtr, this, chan_msgs, nrequest, response, timeout, flags); }

  public void set_timeout(long timeout) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbChannel_set_timeout(swigCPtr, this, timeout); }

}