-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCommoncfg.java
More file actions
78 lines (55 loc) · 1.76 KB
/
Commoncfg.java
File metadata and controls
78 lines (55 loc) · 1.76 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
// This is used to store parameters in the common.cfg.
public class Commoncfg {
int Num_Of_PreferredNeighbors;
int Unchoking_Interval;
int Optimistic_Unchoking_Interval;
String FileName;
int FileSize;
int PieceSize;
public Commoncfg() {
}
public Commoncfg(int nop, int ui, int oui, String fn, int fs, int ps) {
this.Num_Of_PreferredNeighbors = nop;
this.Unchoking_Interval = ui;
this.Optimistic_Unchoking_Interval = oui;
this.FileName = fn;
this.FileSize = fs;
this.PieceSize = ps;
}
public int getNum_Of_PreferredNeighbors() {
return Num_Of_PreferredNeighbors;
}
public void setNum_Of_PreferredNeighbors(int num_Of_PreferredNeighbors) {
Num_Of_PreferredNeighbors = num_Of_PreferredNeighbors;
}
public int getUnchoking_Interval() {
return Unchoking_Interval;
}
public void setUnchoking_Interval(int Unchoking_Interval) {
this.Unchoking_Interval = Unchoking_Interval;
}
public int getOptimistic_Unchoking_Interval() {
return this.Optimistic_Unchoking_Interval;
}
public void setOptimistic_Unchoking_Interval(int Optimistic_Unchoking_Interval) {
this.Optimistic_Unchoking_Interval = Optimistic_Unchoking_Interval;
}
public String getFileName() {
return this.FileName;
}
public void setFileName(String FileName) {
this.FileName = FileName;
}
public int getFileSize() {
return this.FileSize;
}
public void setFileSize(int FileSize) {
this.FileSize = FileSize;
}
public int getPieceSize() {
return this.PieceSize;
}
public void setPieceSize(int PieceSize) {
this.PieceSize = PieceSize;
}
}