@Test public void testWriteAndReadThemisLock() throws IOException { ThemisLock expect = getNullThemisLock(); ThemisLock actual = new NullThemisLock(); writeObjectToBufferAndRead(expect, actual); Assert.assertTrue(expect.equals(actual)); }
@Override public boolean equals(Object object) { if (!(object instanceof ThemisLock)) { return false; } ThemisLock lock = (ThemisLock)object; return this.type == lock.type && this.timestamp == lock.timestamp && this.wallTime == lock.wallTime && this.clientAddress.equals(lock.clientAddress); }
ThemisLock implements Writable { @Override public boolean equals(Object object) { if (!(object instanceof ThemisLock)) { return false; } ThemisLock lock = (ThemisLock)object; return this.type == lock.type && this.timestamp == lock.timestamp && this.wallTime == lock.wallTime && this.clientAddress.equals(lock.clientAddress); } }
ThemisLock implements Writable { @Override public boolean equals(Object object) { if (!(object instanceof ThemisLock)) { return false; } ThemisLock lock = (ThemisLock)object; return this.type == lock.type && this.timestamp == lock.timestamp && this.wallTime == lock.wallTime && this.clientAddress.equals(lock.clientAddress); } protected  ThemisLock();  ThemisLock(Type type); }
ThemisLock implements Writable { @Override public boolean equals(Object object) { if (!(object instanceof ThemisLock)) { return false; } ThemisLock lock = (ThemisLock)object; return this.type == lock.type && this.timestamp == lock.timestamp && this.wallTime == lock.wallTime && this.clientAddress.equals(lock.clientAddress); } protected  ThemisLock();  ThemisLock(Type type); boolean isLockExpired(); void setLockExpired(boolean lockExpired); ColumnCoordinate getColumn(); void setColumn(ColumnCoordinate columnCoordinate); long getTimestamp(); void setTimestamp(long timestamp); abstract boolean isPrimary(); String getClientAddress(); void setClientAddress(String clientAddress); long getWallTime(); void setWallTime(long wallTime); Type getType(); void setType(Type type); void write(DataOutput out); void readFields(DataInput in); @Override boolean equals(Object object); @Override String toString(); static byte[] toByte(ThemisLock lock); static ThemisLock parseFromByte(byte[] data); static void copyThemisLock(ThemisLock source, ThemisLock dest); }
ThemisLock implements Writable { @Override public boolean equals(Object object) { if (!(object instanceof ThemisLock)) { return false; } ThemisLock lock = (ThemisLock)object; return this.type == lock.type && this.timestamp == lock.timestamp && this.wallTime == lock.wallTime && this.clientAddress.equals(lock.clientAddress); } protected  ThemisLock();  ThemisLock(Type type); boolean isLockExpired(); void setLockExpired(boolean lockExpired); ColumnCoordinate getColumn(); void setColumn(ColumnCoordinate columnCoordinate); long getTimestamp(); void setTimestamp(long timestamp); abstract boolean isPrimary(); String getClientAddress(); void setClientAddress(String clientAddress); long getWallTime(); void setWallTime(long wallTime); Type getType(); void setType(Type type); void write(DataOutput out); void readFields(DataInput in); @Override boolean equals(Object object); @Override String toString(); static byte[] toByte(ThemisLock lock); static ThemisLock parseFromByte(byte[] data); static void copyThemisLock(ThemisLock source, ThemisLock dest);  }