forked from netease-im/camellia
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
camellia-redis-proxy support multi-read-resources while rw_separate
- Loading branch information
1 parent
a2d2b40
commit f2f5352
Showing
6 changed files
with
99 additions
and
48 deletions.
There are no files selected for viewing
50 changes: 50 additions & 0 deletions
50
camellia-core/src/main/java/com/netease/nim/camellia/core/util/CamelliaPair.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
package com.netease.nim.camellia.core.util; | ||
|
||
import java.util.Objects; | ||
|
||
/** | ||
* | ||
* Created by caojiajun on 2020/4/10. | ||
*/ | ||
public class CamelliaPair<T, W> { | ||
private T first; | ||
private W second; | ||
|
||
public CamelliaPair() { | ||
} | ||
|
||
public CamelliaPair(T first, W second) { | ||
this.first = first; | ||
this.second = second; | ||
} | ||
|
||
public T getFirst() { | ||
return first; | ||
} | ||
|
||
public void setFirst(T first) { | ||
this.first = first; | ||
} | ||
|
||
public W getSecond() { | ||
return second; | ||
} | ||
|
||
public void setSecond(W second) { | ||
this.second = second; | ||
} | ||
|
||
@Override | ||
public boolean equals(Object o) { | ||
if (this == o) return true; | ||
if (o == null || getClass() != o.getClass()) return false; | ||
CamelliaPair<?, ?> camelliaPair = (CamelliaPair<?, ?>) o; | ||
return Objects.equals(first, camelliaPair.first) && | ||
Objects.equals(second, camelliaPair.second); | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
return Objects.hash(first, second); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters