1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package io.netty.channel.kqueue;
17
18 import io.netty.channel.IoEvent;
19
20
21
22
23 public final class KQueueIoEvent implements IoEvent {
24 private int ident;
25 private short filter;
26 private short flags;
27 private int fflags;
28 private long data;
29
30
31
32
33
34
35
36
37
38
39 public static KQueueIoEvent newEvent(int ident, short filter, short flags, int fflags) {
40 return new KQueueIoEvent(ident, filter, flags, fflags, 0);
41 }
42
43 private KQueueIoEvent(int ident, short filter, short flags, int fflags, long data) {
44 this.ident = ident;
45 this.filter = filter;
46 this.flags = flags;
47 this.fflags = fflags;
48 this.data = data;
49 }
50
51 KQueueIoEvent() {
52 this(0, (short) 0, (short) 0, 0, 0);
53 }
54
55
56 void update(int ident, short filter, short flags, int fflags, long data) {
57 this.ident = ident;
58 this.filter = filter;
59 this.flags = flags;
60 this.fflags = fflags;
61 this.data = data;
62 }
63
64
65
66
67
68
69 public int ident() {
70 return ident;
71 }
72
73
74
75
76
77
78 public short filter() {
79 return filter;
80 }
81
82
83
84
85
86
87 public short flags() {
88 return flags;
89 }
90
91
92
93
94
95
96 public int fflags() {
97 return fflags;
98 }
99
100
101
102
103
104
105 public long data() {
106 return data;
107 }
108
109 @Override
110 public String toString() {
111 return "KQueueIoEvent{" +
112 "ident=" + ident +
113 ", filter=" + filter +
114 ", flags=" + flags +
115 ", fflags=" + fflags +
116 ", data=" + data +
117 '}';
118 }
119 }