|
|
|
@ -17,12 +17,14 @@ package org.redisson.transaction;
|
|
|
|
|
|
|
|
|
|
import org.redisson.client.codec.Codec;
|
|
|
|
|
|
|
|
|
|
import java.util.Objects;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
*
|
|
|
|
|
* @author Nikita Koksharov
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
public class HashKey {
|
|
|
|
|
public final class HashKey {
|
|
|
|
|
|
|
|
|
|
final Codec codec;
|
|
|
|
|
final String name;
|
|
|
|
@ -41,29 +43,15 @@ public class HashKey {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
@SuppressWarnings("AvoidInlineConditionals")
|
|
|
|
|
public int hashCode() {
|
|
|
|
|
final int prime = 31;
|
|
|
|
|
int result = 1;
|
|
|
|
|
result = prime * result + ((name == null) ? 0 : name.hashCode());
|
|
|
|
|
return result;
|
|
|
|
|
public boolean equals(Object o) {
|
|
|
|
|
if (this == o) return true;
|
|
|
|
|
if (o == null || getClass() != o.getClass()) return false;
|
|
|
|
|
HashKey hashKey = (HashKey) o;
|
|
|
|
|
return Objects.equals(name, hashKey.name);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public boolean equals(Object obj) {
|
|
|
|
|
if (this == obj)
|
|
|
|
|
return true;
|
|
|
|
|
if (obj == null)
|
|
|
|
|
return false;
|
|
|
|
|
if (getClass() != obj.getClass())
|
|
|
|
|
return false;
|
|
|
|
|
HashKey other = (HashKey) obj;
|
|
|
|
|
if (name == null) {
|
|
|
|
|
if (other.name != null)
|
|
|
|
|
return false;
|
|
|
|
|
} else if (!name.equals(other.name))
|
|
|
|
|
return false;
|
|
|
|
|
return true;
|
|
|
|
|
public int hashCode() {
|
|
|
|
|
return Objects.hashCode(name);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|