public class Grid extends Object implements TokenRegistry
| Modifier and Type | Field and Description |
|---|---|
static String |
LOCAL_AGENT |
| Constructor and Description |
|---|
Grid(File fileManagerFolder,
Integer port) |
Grid(File fileManagerFolder,
Integer port,
Integer ttl) |
Grid(Integer port) |
| Modifier and Type | Method and Description |
|---|---|
Collection<AgentRef> |
getAgents() |
FileManager |
getFileManager() |
int |
getServerPort() |
List<Token<TokenWrapper>> |
getTokens() |
protected void |
handleRegistrationMessage(RegistrationMessage message) |
void |
markTokenAsFailing(String tokenId,
String errorMessage,
Exception e) |
void |
removeTokenError(String tokenId) |
void |
returnToken(TokenWrapper object) |
TokenWrapper |
selectToken(Identity pretender,
long matchTimeout,
long noMatchTimeout) |
void |
start() |
void |
startTokenMaintenance(String tokenId) |
void |
stop() |
void |
stopTokenMaintenance(String tokenId) |
public static final String LOCAL_AGENT
public Grid(Integer port)
protected void handleRegistrationMessage(RegistrationMessage message)
public TokenWrapper selectToken(Identity pretender, long matchTimeout, long noMatchTimeout) throws TimeoutException, InterruptedException
selectToken in interface TokenRegistryTimeoutExceptionInterruptedExceptionpublic void returnToken(TokenWrapper object)
returnToken in interface TokenRegistrypublic void markTokenAsFailing(String tokenId, String errorMessage, Exception e)
markTokenAsFailing in interface TokenRegistrypublic void removeTokenError(String tokenId)
public void startTokenMaintenance(String tokenId)
public void stopTokenMaintenance(String tokenId)
public List<Token<TokenWrapper>> getTokens()
getTokens in interface TokenRegistrypublic Collection<AgentRef> getAgents()
public int getServerPort()
public FileManager getFileManager()
Copyright © 2018. All rights reserved.