@Test public void shouldDetectSameOwner() { NlmLock lock1 = new NlmLock(lo1, nfs_lock_type4.WRITE_LT, 0, nfs4_prot.NFS4_UINT64_MAX); NlmLock lock2 = new NlmLock(lo1, nfs_lock_type4.READ_LT, 0, nfs4_prot.NFS4_UINT64_MAX); assertTrue("must detect same owners", lock1.isSameOwner(lock2)); }
public boolean isSameOwner(NlmLock other) { return this.owner.equals(other.owner); }
NlmLock implements Serializable { public boolean isSameOwner(NlmLock other) { return this.owner.equals(other.owner); } }
NlmLock implements Serializable { public boolean isSameOwner(NlmLock other) { return this.owner.equals(other.owner); } NlmLock(StateOwner owner, int lockType, long offset, long length); }
NlmLock implements Serializable { public boolean isSameOwner(NlmLock other) { return this.owner.equals(other.owner); } NlmLock(StateOwner owner, int lockType, long offset, long length); StateOwner getOwner(); long getOffset(); long getLength(); int getLockType(); @Override int hashCode(); @Override boolean equals(Object obj); boolean isSameOwner(NlmLock other); boolean isOverlappingRange(NlmLock other); boolean isConflictingType(NlmLock other); boolean isConflicting(NlmLock other); @Override String toString(); }
NlmLock implements Serializable { public boolean isSameOwner(NlmLock other) { return this.owner.equals(other.owner); } NlmLock(StateOwner owner, int lockType, long offset, long length); StateOwner getOwner(); long getOffset(); long getLength(); int getLockType(); @Override int hashCode(); @Override boolean equals(Object obj); boolean isSameOwner(NlmLock other); boolean isOverlappingRange(NlmLock other); boolean isConflictingType(NlmLock other); boolean isConflicting(NlmLock other); @Override String toString();  }