public class GridImpl extends Object implements Grid
| Modifier and Type | Class and Description |
|---|---|
static class |
GridImpl.GridImplConfig |
LOCAL_AGENT| Constructor and Description |
|---|
GridImpl(File fileManagerFolder,
Integer port) |
GridImpl(File fileManagerFolder,
Integer port,
GridImpl.GridImplConfig gridConfig) |
GridImpl(Integer port) |
| Modifier and Type | Method and Description |
|---|---|
Collection<AgentRef> |
getAgents() |
FileVersion |
getRegisteredFile(FileVersionId fileVersionId) |
int |
getServerPort() |
List<Token<TokenWrapper>> |
getTokens() |
protected void |
handleRegistrationMessage(RegistrationMessage message) |
void |
markTokenAsFailing(String tokenId,
String errorMessage,
Exception e) |
FileVersion |
registerFile(File file) |
FileVersion |
registerFile(InputStream inputStream,
String fileName,
boolean isDirectory) |
void |
removeTokenError(String tokenId) |
void |
returnToken(TokenWrapper object) |
TokenWrapper |
selectToken(Map<String,String> attributes,
Map<String,Interest> interests,
long matchTimeout,
long noMatchTimeout) |
void |
start() |
void |
startTokenMaintenance(String tokenId) |
void |
stop() |
void |
stopTokenMaintenance(String tokenId) |
void |
unregisterFile(FileVersionId fileVersionId) |
public GridImpl(Integer port) throws IOException
IOExceptionpublic GridImpl(File fileManagerFolder, Integer port, GridImpl.GridImplConfig gridConfig)
protected void handleRegistrationMessage(RegistrationMessage message)
public TokenWrapper selectToken(Map<String,String> attributes, Map<String,Interest> interests, 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 FileVersion registerFile(InputStream inputStream, String fileName, boolean isDirectory) throws FileManagerException
registerFile in interface GridFileServiceFileManagerExceptionpublic FileVersion registerFile(File file) throws FileManagerException
registerFile in interface GridFileServiceFileManagerExceptionpublic FileVersion getRegisteredFile(FileVersionId fileVersionId) throws FileManagerException
getRegisteredFile in interface GridFileServiceFileManagerExceptionpublic void unregisterFile(FileVersionId fileVersionId)
unregisterFile in interface GridFileServiceCopyright © 2019. All rights reserved.