public class Servers
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
class |
Servers.WrongParametersException
Exception class
|
| Constructor and Description |
|---|
Servers(int nserv,
int nrep,
int seed)
Generates a Simulated Distributed File System
|
| Modifier and Type | Method and Description |
|---|---|
java.util.Set<java.lang.Integer> |
fileLocations(int fileID)
Return the servers where the file is
|
int |
size() |
int |
tranmissionTime(int serverID,
int userID)
Return the transmission time of a file from a serverID to a userID
|
public Servers(int nserv,
int nrep,
int seed)
throws Servers.WrongParametersException
nserv - Number of Serversnrep - Number of minimum replications for fileseed - Random Number Generator seedServers.WrongParametersExceptionpublic int tranmissionTime(int serverID,
int userID)
serverID - userID - public java.util.Set<java.lang.Integer> fileLocations(int fileID)
fileID - ID of the filepublic int size()