public unsafe static int SDBP_Init(SWIGTYPE_p_void client, SDBP_NodeParams arg1) { int ret = scaliendb_clientPINVOKE.SDBP_Init(SWIGTYPE_p_void.getCPtr(client), SDBP_NodeParams.getCPtr(arg1)); if (scaliendb_clientPINVOKE.SWIGPendingException.Pending) { throw scaliendb_clientPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public Client(string[] nodes) { cptr = scaliendb_client.SDBP_Create(); result = null; SDBP_NodeParams nodeParams = new SDBP_NodeParams(nodes.Length); for (int i = 0; i < nodes.Length; i++) nodeParams.AddNode(nodes[i]); int status = scaliendb_client.SDBP_Init(cptr, nodeParams); nodeParams.Close(); }
/// <summary> /// Construct a Client object. Pass in the list of controllers as strings in the form "host:port". /// </summary> /// <param name="nodes">The controllers as a list of strings in the form "host:port".</param> /// <example><code> /// Client client = new Client({"192.168.1.1:7080", "192.168.1.2:7080"}); /// </code></example> public Client(string[] nodes) { cptr = scaliendb_client.SDBP_Create(); result = null; SDBP_NodeParams nodeParams = new SDBP_NodeParams(nodes.Length); for (int i = 0; i < nodes.Length; i++) { nodeParams.AddNode(nodes[i]); } int status = scaliendb_client.SDBP_Init(cptr, nodeParams); nodeParams.Close(); Nodes = nodes; }
public static unsafe int SDBP_Init(SWIGTYPE_p_void client, SDBP_NodeParams arg1) { int ret = scaliendb_clientPINVOKE.SDBP_Init(SWIGTYPE_p_void.getCPtr(client), SDBP_NodeParams.getCPtr(arg1)); if (scaliendb_clientPINVOKE.SWIGPendingException.Pending) throw scaliendb_clientPINVOKE.SWIGPendingException.Retrieve(); return ret; }
public Quorum CreateQuorum(ulong[] nodes) { SDBP_NodeParams nodeParams = new SDBP_NodeParams(nodes.Length); for (int i = 0; i < nodes.Length; i++) { string nodeString = "" + nodes[i]; nodeParams.AddNode(nodeString); } int status = scaliendb_client.SDBP_CreateQuorum(cptr, nodeParams); nodeParams.Close(); CheckResultStatus(status, "Cannot create quorum"); return new Quorum(this, result.GetNumber()); }
internal static HandleRef getCPtr(SDBP_NodeParams obj) { return((obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr); }
internal static HandleRef getCPtr(SDBP_NodeParams obj) { return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr; }