-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathESContext.java
70 lines (50 loc) · 1.17 KB
/
ESContext.java
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
package c.a.i.search;
/**
* Created with IntelliJ IDEA.
* User: aminerounak
* Date: 10/22/13
* Time: 1:33 PM
* To change this template use File | Settings | File Templates.
*/
import org.slf4j.Logger;
public class ESContext {
public static class Builder {
private ESContext ctx = new ESContext();
Builder action(Action arg) {
ctx.action = arg;
return this;
}
Builder logger(Logger action) {
ctx.logger = action;
return this;
}
Builder start(long arg) {
ctx.start = arg;
return this;
}
ESContext build() {
return ctx;
}
}
private Logger logger;
private long start;
private Action action;
public Logger getLogger() {
return logger;
}
public void setLogger(Logger logger) {
this.logger = logger;
}
public long getStart() {
return start;
}
public void setStart(long start) {
this.start = start;
}
public Action getAction() {
return action;
}
public void setAction(Action action) {
this.action = action;
}
}