-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- enhance: ServiceChangedListener
- Loading branch information
Showing
34 changed files
with
656 additions
and
129 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
dependencies { | ||
api("io.lettuce:lettuce-core") | ||
|
||
} |
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
43 changes: 43 additions & 0 deletions
43
cosky-discovery/src/main/java/me/ahoo/cosky/discovery/NamespacedInstanceId.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,43 @@ | ||
package me.ahoo.cosky.discovery; | ||
|
||
import com.google.common.base.Objects; | ||
import me.ahoo.cosky.core.Namespaced; | ||
|
||
/** | ||
* @author ahoo wang | ||
*/ | ||
public class NamespacedInstanceId implements Namespaced { | ||
private final String namespace; | ||
private final String instanceId; | ||
|
||
public NamespacedInstanceId(String namespace, String instanceId) { | ||
this.namespace = namespace; | ||
this.instanceId = instanceId; | ||
} | ||
|
||
public static NamespacedInstanceId of(String namespace, String instanceId) { | ||
return new NamespacedInstanceId(namespace, instanceId); | ||
} | ||
|
||
@Override | ||
public String getNamespace() { | ||
return namespace; | ||
} | ||
|
||
public String getInstanceId() { | ||
return instanceId; | ||
} | ||
|
||
@Override | ||
public boolean equals(Object o) { | ||
if (this == o) return true; | ||
if (!(o instanceof NamespacedInstanceId)) return false; | ||
NamespacedInstanceId that = (NamespacedInstanceId) o; | ||
return Objects.equal(namespace, that.namespace) && Objects.equal(instanceId, that.instanceId); | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
return Objects.hashCode(namespace, instanceId); | ||
} | ||
} |
43 changes: 0 additions & 43 deletions
43
cosky-discovery/src/main/java/me/ahoo/cosky/discovery/NamespacedServiceInstance.java
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.