public class Grid extends Object implements TokenRegistry, GridFileService
| Modifier and Type | Field and Description |
|---|---|
static String |
LOCAL_AGENT |
| Constructor and Description |
|---|
Grid(Integer port) |
Grid(Integer port,
Integer ttl) |
| Modifier and Type | Method and Description |
|---|---|
Collection<AgentRef> |
getAgents() |
File |
getRegisteredFile(String fileHandle) |
int |
getServerPort() |
List<Token<TokenWrapper>> |
getTokens() |
protected void |
handleRegistrationMessage(RegistrationMessage message) |
String |
registerFile(File file) |
void |
returnToken(TokenWrapper object) |
TokenWrapper |
selectToken(Identity pretender,
long matchTimeout,
long noMatchTimeout) |
void |
start() |
void |
stop() |
public static final String LOCAL_AGENT
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 String registerFile(File file)
registerFile in interface GridFileServicepublic File getRegisteredFile(String fileHandle)
getRegisteredFile in interface GridFileServicepublic List<Token<TokenWrapper>> getTokens()
getTokens in interface TokenRegistrypublic Collection<AgentRef> getAgents()
public int getServerPort()
Copyright © 2018. All rights reserved.