public static BBuffer create(BBinaryModel bmodel, ByteBuffer buf) { if (bmodel == BBinaryModel.MEDIUM) { return new BBufferBin(bmodel, buf); } throw new InvalidOperationException(); }
public static BBuffer create(BBinaryModel bmodel, ByteBuffer buf) { if (bmodel == BBinaryModel.MEDIUM) { return(new BBufferBin(bmodel, buf)); } throw new InvalidOperationException(); }
public BRegistry getRegistry(BBinaryModel bmodel) { BRegistry ret = null; if (!registries.TryGetValue(bmodel, out ret)) { throw new InvalidOperationException("No registry for protocol=" + bmodel); } return ret; }
public BRegistry getRegistry(BBinaryModel bmodel) { BRegistry ret = null; if (!registries.TryGetValue(bmodel, out ret)) { throw new InvalidOperationException("No registry for protocol=" + bmodel); } return(ret); }
private void internalTestPerformance(BBinaryModel bmodel, int gzip, int loopCount, int objCount) { BClient_Testser client = TestUtilsHttp.createClient(); PrimitiveTypes[] primitiveTypes1 = new PrimitiveTypes[objCount]; for (int i = 0; i < primitiveTypes1.Length; i++) { primitiveTypes1[i] = TestUtils.createObjectPrimitiveTypes(); } long t1 = DateTime.Now.Ticks; for (int i = 0; i < loopCount; i++) { client.RemoteArrayTypes1dim.SetPrimitiveTypes(primitiveTypes1); } long t2 = DateTime.Now.Ticks; long t3 = DateTime.Now.Ticks; for (int i = 0; i < loopCount; i++) { client.RemoteArrayTypes1dim.GetPrimitiveTypes(); } long t4 = DateTime.Now.Ticks; client.done(); t1 /= 10000; t2 /= 10000; t3 /= 10000; t4 /= 10000; log.info("bmodel=" + bmodel.ToString().Substring(0,2) + ", gzip=" + gzip + ", #objs=" + objCount.ToString("000000") + ", #loops=" + loopCount.ToString("000000") + ", call-ms=" + ((t2 - t1) + (t4 - t3)).ToString("000000") + "/" + (t2 - t1).ToString("000000") + "/" + (t4 - t3).ToString("000000") ); }
public BRegistry(BBinaryModel bmodel) { this.bmodel = bmodel; }
internal BBufferBin(BBinaryModel bmodel, ByteBuffer buf) { this.bmodel = bmodel; this.buf = buf != null ? buf : ByteBuffer.allocate(10 * 1000); }
public virtual int size(Object obj1, BBinaryModel bmodel) { return 0; }
public virtual int size(Object obj1, BBinaryModel bmodel) { return(0); }