All Downloads are FREE. Search and download functionalities are using the official Maven repository.

monad.jni.services.gen.SlaveNoSQLSupport Maven / Gradle / Ivy

There is a newer version: 5.1.0
Show newest version
/* ----------------------------------------------------------------------------
 * This file was automatically generated by SWIG (http://www.swig.org).
 * Version 2.0.4
 *
 * Do not make changes to this file unless you know what you are doing--modify
 * the SWIG interface file instead.
 * ----------------------------------------------------------------------------- */

package monad.jni.services.gen;

public class SlaveNoSQLSupport extends NoSQLSupport {
  private long swigCPtr;

  public SlaveNoSQLSupport(long cPtr, boolean cMemoryOwn) {
    super(CMonadJNI.SlaveNoSQLSupport_SWIGUpcast(cPtr), cMemoryOwn);
    swigCPtr = cPtr;
  }

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

  protected void finalize() {
    delete();
  }

  public synchronized void delete() {
    if (swigCPtr != 0) {
      if (swigCMemOwn) {
        swigCMemOwn = false;
        CMonadJNI.delete_SlaveNoSQLSupport(swigCPtr);
      }
      swigCPtr = 0;
    }
    super.delete();
  }

  public SlaveNoSQLSupport(String db_path, NoSQLOptions options) throws monad.jni.services.StatusException {
    this(CMonadJNI.new_SlaveNoSQLSupport(db_path, NoSQLOptions.getCPtr(options), options), true);
  }

  public MonadStatus PutBinlog(SyncBinlogValue binlog_value) {
    return new MonadStatus(CMonadJNI.SlaveNoSQLSupport_PutBinlog(swigCPtr, this, SyncBinlogValue.getCPtr(binlog_value), binlog_value), true);
  }

  public MonadStatus PutSlaveBinlog(SlaveBinlogValue binlog_value, byte[] data) {
    return new MonadStatus(CMonadJNI.SlaveNoSQLSupport_PutSlaveBinlog(swigCPtr, this, SlaveBinlogValue.getCPtr(binlog_value), binlog_value,  data ), true);
  }

  public int GetDataCount() {
    return CMonadJNI.SlaveNoSQLSupport_GetDataCount(swigCPtr, this);
  }

  public SyncBinlogValue FindNextBinlog(long binlog_seq) {
    long cPtr = CMonadJNI.SlaveNoSQLSupport_FindNextBinlog(swigCPtr, this, binlog_seq);
    return (cPtr == 0) ? null : new SyncBinlogValue(cPtr, true);
  }

  public long FindLastBinlog() {
    return CMonadJNI.SlaveNoSQLSupport_FindLastBinlog(swigCPtr, this);
  }

  public MonadStatus DeleteBinlogRange(long from, long to) {
    return new MonadStatus(CMonadJNI.SlaveNoSQLSupport_DeleteBinlogRange(swigCPtr, this, from, to), true);
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy