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<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(String tokenId) |
TokenWrapper |
selectToken(Map<String,String> attributes,
Map<String,Interest> interests,
long matchTimeout,
long noMatchTimeout,
TokenWrapperOwner tokenOwner) |
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, TokenWrapperOwner tokenOwner) throws TimeoutException, InterruptedException
selectToken in interface GridTimeoutExceptionInterruptedExceptionpublic void returnToken(String tokenId)
returnToken in interface Gridpublic void markTokenAsFailing(String tokenId, String errorMessage, Exception e)
markTokenAsFailing in interface Gridpublic void removeTokenError(String tokenId)
public void startTokenMaintenance(String tokenId)
public void stopTokenMaintenance(String tokenId)
public List<TokenWrapper> getTokens()
public 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.