forked from Terracotta-OSS/galvan
-
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.
Fix Terracotta-OSS#9 - Expose Cluster configuration using IClientTest…
…Environment
- Loading branch information
1 parent
7c7ac71
commit 0333aa7
Showing
3 changed files
with
51 additions
and
0 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
22 changes: 22 additions & 0 deletions
22
test-interfaces/src/main/java/org/terracotta/passthrough/IClusterInfo.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,22 @@ | ||
package org.terracotta.passthrough; | ||
|
||
import java.util.Collection; | ||
|
||
/** | ||
* An abstraction to expose cluster information to clients for e.g. server configuration etc | ||
* | ||
* @author vmad | ||
*/ | ||
public interface IClusterInfo { | ||
|
||
/** | ||
* @param name server name to identify the server | ||
* @return corresponding {@link IServerInfo} | ||
*/ | ||
IServerInfo getServerInfo(String name); | ||
|
||
/** | ||
* @return A collection {@link IServerInfo} for all servers in this stripe | ||
*/ | ||
Collection<IServerInfo> getServersInfo(); | ||
} |
24 changes: 24 additions & 0 deletions
24
test-interfaces/src/main/java/org/terracotta/passthrough/IServerInfo.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,24 @@ | ||
package org.terracotta.passthrough; | ||
|
||
/** | ||
* Provides a server information like configured server port and group port etc | ||
* | ||
* @author vmad | ||
*/ | ||
public interface IServerInfo { | ||
|
||
/** | ||
* @return name of this server | ||
*/ | ||
String getName(); | ||
|
||
/** | ||
* @return configured server port for this server | ||
*/ | ||
int getServerPort(); | ||
|
||
/** | ||
* @return configured server group port for this server | ||
*/ | ||
int getGroupPort(); | ||
} |