public MemoryUsage deepCopy() { return new MemoryUsage(this); }
@Override public MemoryUsage getMemoryUsage(boolean forceGc) throws TException { if (forceGc) { System.gc(); //NOSONAR } MemoryUsage memUsage = new MemoryUsage(); memUsage.setMax(Runtime.getRuntime().maxMemory()); memUsage.setFree(Runtime.getRuntime().freeMemory()); memUsage.setTotal(Runtime.getRuntime().totalMemory()); return memUsage; }
/** * Performs a deep copy on <i>other</i>. */ public getMemoryUsage_result(getMemoryUsage_result other) { if (other.isSetSuccess()) { this.success = new MemoryUsage(other.success); } if (other.isSetCliException()) { this.cliException = new CliThriftException(other.cliException); } }
case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.success = new MemoryUsage(); struct.success.read(iprot); struct.setSuccessIsSet(true);
@Override public void read(org.apache.thrift.protocol.TProtocol prot, getMemoryUsage_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.success = new MemoryUsage(); struct.success.read(iprot); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.cliException = new CliThriftException(); struct.cliException.read(iprot); struct.setCliExceptionIsSet(true); } } }