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

monad.jni.services.gen.SyncNoSQL 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 SyncNoSQL extends NoSQLSupport {
  private long swigCPtr;

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

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

  protected void finalize() {
    delete();
  }

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

  public int FindOrLoadPartitionCount(short partition_id) throws monad.jni.services.StatusException {
    return CMonadJNI.SyncNoSQL_FindOrLoadPartitionCount(swigCPtr, this, partition_id);
  }

  public SyncNoSQL(String db_path, NoSQLOptions options) {
    this(CMonadJNI.new_SyncNoSQL(db_path, NoSQLOptions.getCPtr(options), options), true);
  }

  public MonadStatus PutDataWithBinlog(byte[] key, byte[] data, SyncBinlogOptions binlog_options) {
    return new MonadStatus(CMonadJNI.SyncNoSQL_PutDataWithBinlog(swigCPtr, this,  key ,  data , SyncBinlogOptions.getCPtr(binlog_options), binlog_options), true);
  }

  public MonadStatus GetBinlogValue(SyncBinlogKey binglog_key, SyncBinlogValue value) {
    return new MonadStatus(CMonadJNI.SyncNoSQL_GetBinlogValue(swigCPtr, this, SyncBinlogKey.getCPtr(binglog_key), binglog_key, SyncBinlogValue.getCPtr(value), value), true);
  }

  public long FindMaxBinlogSeqByPartitionId(short partition_id) {
    return CMonadJNI.SyncNoSQL_FindMaxBinlogSeqByPartitionId(swigCPtr, this, partition_id);
  }

  public long FindMinBinlogSeqByPartitionId(short partition_id) {
    return CMonadJNI.SyncNoSQL_FindMinBinlogSeqByPartitionId(swigCPtr, this, partition_id);
  }

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

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy