public RecoveryStatus deepCopy() { return new RecoveryStatus(this); }
@Override public boolean equals(java.lang.Object that) { if (that == null) return false; if (that instanceof RecoveryStatus) return this.equals((RecoveryStatus)that); return false; }
public java.lang.Object getFieldValue(_Fields field) { switch (field) { case NAME: return getName(); case RUNTIME: return getRuntime(); case PROGRESS: return getProgress(); } throw new java.lang.IllegalStateException(); }
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case NAME: return isSetName(); case RUNTIME: return isSetRuntime(); case PROGRESS: return isSetProgress(); } throw new java.lang.IllegalStateException(); }
for (int _i6 = 0; _i6 < _list4.size; ++_i6) _elem5 = new RecoveryStatus(); _elem5.read(iprot); struct.logSorts.add(_elem5);
/** * Performs a deep copy on <i>other</i>. */ public RecoveryStatus(RecoveryStatus other) { __isset_bitfield = other.__isset_bitfield; if (other.isSetName()) { this.name = other.name; } this.runtime = other.runtime; this.progress = other.progress; }
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } }
for (int _i22 = 0; _i22 < _list20.size; ++_i22) _elem21 = new RecoveryStatus(); _elem21.read(iprot); struct.logSorts.add(_elem21);
@Override public void write(org.apache.thrift.protocol.TProtocol prot, RecoveryStatus struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetName()) { optionals.set(0); } if (struct.isSetRuntime()) { optionals.set(1); } if (struct.isSetProgress()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetName()) { oprot.writeString(struct.name); } if (struct.isSetRuntime()) { oprot.writeI32(struct.runtime); } if (struct.isSetProgress()) { oprot.writeDouble(struct.progress); } }
@Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetName()) ? 131071 : 524287); if (isSetName()) hashCode = hashCode * 8191 + name.hashCode(); hashCode = hashCode * 8191 + runtime; hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(progress); return hashCode; }
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } }
for (int _i6 = 0; _i6 < _list4.size; ++_i6) _elem5 = new RecoveryStatus(); _elem5.read(iprot); struct.logSorts.add(_elem5);
public List<RecoveryStatus> getLogSorts() { List<RecoveryStatus> result = new ArrayList<>(); synchronized (currentWork) { for (Entry<String,LogProcessor> entries : currentWork.entrySet()) { RecoveryStatus status = new RecoveryStatus(); status.name = entries.getKey(); try { double progress = entries.getValue().getBytesCopied() / walBlockSize; // to be sure progress does not exceed 100% status.progress = Math.min(progress, 99.9); } catch (IOException ex) { log.warn("Error getting bytes read"); } status.runtime = (int) entries.getValue().getSortTime(); result.add(status); } return result; } } }
lastComparison = java.lang.Boolean.valueOf(isSetName()).compareTo(other.isSetName()); if (lastComparison != 0) { return lastComparison; if (isSetName()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name); if (lastComparison != 0) { lastComparison = java.lang.Boolean.valueOf(isSetRuntime()).compareTo(other.isSetRuntime()); if (lastComparison != 0) { return lastComparison; if (isSetRuntime()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.runtime, other.runtime); if (lastComparison != 0) { lastComparison = java.lang.Boolean.valueOf(isSetProgress()).compareTo(other.isSetProgress()); if (lastComparison != 0) { return lastComparison; if (isSetProgress()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.progress, other.progress); if (lastComparison != 0) {
public Object getFieldValue(_Fields field) { switch (field) { case NAME: return getName(); case RUNTIME: return getRuntime(); case PROGRESS: return getProgress(); } throw new IllegalStateException(); }
@Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof RecoveryStatus) return this.equals((RecoveryStatus)that); return false; }
for (int _i22 = 0; _i22 < _list20.size; ++_i22) _elem21 = new RecoveryStatus(); _elem21.read(iprot); struct.logSorts.add(_elem21);
java.util.List<RecoveryStatus> __this__logSorts = new java.util.ArrayList<RecoveryStatus>(other.logSorts.size()); for (RecoveryStatus other_element : other.logSorts) { __this__logSorts.add(new RecoveryStatus(other_element));
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case NAME: return isSetName(); case RUNTIME: return isSetRuntime(); case PROGRESS: return isSetProgress(); } throw new IllegalStateException(); }