blob: da6db7e78ef3fe4484657353c2bdc6e6c4a3729e [file] [log] [blame]
tom0eb04ca2014-08-25 14:34:51 -07001// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
2// Copyright (c) 2011, 2012 Open Networking Foundation
3// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
4// This library was generated by the LoxiGen Compiler.
5// See the file LICENSE.txt which should have been included in the source distribution
6
7// Automatically generated by LOXI from template of_class.java
8// Do not modify
9
10package org.projectfloodlight.openflow.protocol.ver12;
11
12import org.projectfloodlight.openflow.protocol.*;
13import org.projectfloodlight.openflow.protocol.action.*;
14import org.projectfloodlight.openflow.protocol.actionid.*;
15import org.projectfloodlight.openflow.protocol.bsntlv.*;
16import org.projectfloodlight.openflow.protocol.errormsg.*;
17import org.projectfloodlight.openflow.protocol.meterband.*;
18import org.projectfloodlight.openflow.protocol.instruction.*;
19import org.projectfloodlight.openflow.protocol.instructionid.*;
20import org.projectfloodlight.openflow.protocol.match.*;
21import org.projectfloodlight.openflow.protocol.oxm.*;
22import org.projectfloodlight.openflow.protocol.queueprop.*;
23import org.projectfloodlight.openflow.types.*;
24import org.projectfloodlight.openflow.util.*;
25import org.projectfloodlight.openflow.exceptions.*;
26import org.slf4j.Logger;
27import org.slf4j.LoggerFactory;
28import java.util.Set;
29import org.jboss.netty.buffer.ChannelBuffer;
30import com.google.common.hash.PrimitiveSink;
31import com.google.common.hash.Funnel;
32
33class OFFlowRemovedVer12 implements OFFlowRemoved {
34 private static final Logger logger = LoggerFactory.getLogger(OFFlowRemovedVer12.class);
35 // version: 1.2
36 final static byte WIRE_VERSION = 3;
37 final static int MINIMUM_LENGTH = 56;
38
39 private final static long DEFAULT_XID = 0x0L;
40 private final static U64 DEFAULT_COOKIE = U64.ZERO;
41 private final static int DEFAULT_PRIORITY = 0x0;
42 private final static short DEFAULT_REASON = (short) 0x0;
43 private final static TableId DEFAULT_TABLE_ID = TableId.ALL;
44 private final static long DEFAULT_DURATION_SEC = 0x0L;
45 private final static long DEFAULT_DURATION_NSEC = 0x0L;
46 private final static int DEFAULT_IDLE_TIMEOUT = 0x0;
47 private final static int DEFAULT_HARD_TIMEOUT = 0x0;
48 private final static U64 DEFAULT_PACKET_COUNT = U64.ZERO;
49 private final static U64 DEFAULT_BYTE_COUNT = U64.ZERO;
50 private final static Match DEFAULT_MATCH = OFFactoryVer12.MATCH_WILDCARD_ALL;
51
52 // OF message fields
53 private final long xid;
54 private final U64 cookie;
55 private final int priority;
56 private final short reason;
57 private final TableId tableId;
58 private final long durationSec;
59 private final long durationNsec;
60 private final int idleTimeout;
61 private final int hardTimeout;
62 private final U64 packetCount;
63 private final U64 byteCount;
64 private final Match match;
65//
66 // Immutable default instance
67 final static OFFlowRemovedVer12 DEFAULT = new OFFlowRemovedVer12(
68 DEFAULT_XID, DEFAULT_COOKIE, DEFAULT_PRIORITY, DEFAULT_REASON, DEFAULT_TABLE_ID, DEFAULT_DURATION_SEC, DEFAULT_DURATION_NSEC, DEFAULT_IDLE_TIMEOUT, DEFAULT_HARD_TIMEOUT, DEFAULT_PACKET_COUNT, DEFAULT_BYTE_COUNT, DEFAULT_MATCH
69 );
70
71 // package private constructor - used by readers, builders, and factory
72 OFFlowRemovedVer12(long xid, U64 cookie, int priority, short reason, TableId tableId, long durationSec, long durationNsec, int idleTimeout, int hardTimeout, U64 packetCount, U64 byteCount, Match match) {
73 this.xid = xid;
74 this.cookie = cookie;
75 this.priority = priority;
76 this.reason = reason;
77 this.tableId = tableId;
78 this.durationSec = durationSec;
79 this.durationNsec = durationNsec;
80 this.idleTimeout = idleTimeout;
81 this.hardTimeout = hardTimeout;
82 this.packetCount = packetCount;
83 this.byteCount = byteCount;
84 this.match = match;
85 }
86
87 // Accessors for OF message fields
88 @Override
89 public OFVersion getVersion() {
90 return OFVersion.OF_12;
91 }
92
93 @Override
94 public OFType getType() {
95 return OFType.FLOW_REMOVED;
96 }
97
98 @Override
99 public long getXid() {
100 return xid;
101 }
102
103 @Override
104 public U64 getCookie() {
105 return cookie;
106 }
107
108 @Override
109 public int getPriority() {
110 return priority;
111 }
112
113 @Override
114 public short getReason() {
115 return reason;
116 }
117
118 @Override
119 public TableId getTableId() {
120 return tableId;
121 }
122
123 @Override
124 public long getDurationSec() {
125 return durationSec;
126 }
127
128 @Override
129 public long getDurationNsec() {
130 return durationNsec;
131 }
132
133 @Override
134 public int getIdleTimeout() {
135 return idleTimeout;
136 }
137
138 @Override
139 public int getHardTimeout() {
140 return hardTimeout;
141 }
142
143 @Override
144 public U64 getPacketCount() {
145 return packetCount;
146 }
147
148 @Override
149 public U64 getByteCount() {
150 return byteCount;
151 }
152
153 @Override
154 public Match getMatch() {
155 return match;
156 }
157
158
159
160 public OFFlowRemoved.Builder createBuilder() {
161 return new BuilderWithParent(this);
162 }
163
164 static class BuilderWithParent implements OFFlowRemoved.Builder {
165 final OFFlowRemovedVer12 parentMessage;
166
167 // OF message fields
168 private boolean xidSet;
169 private long xid;
170 private boolean cookieSet;
171 private U64 cookie;
172 private boolean prioritySet;
173 private int priority;
174 private boolean reasonSet;
175 private short reason;
176 private boolean tableIdSet;
177 private TableId tableId;
178 private boolean durationSecSet;
179 private long durationSec;
180 private boolean durationNsecSet;
181 private long durationNsec;
182 private boolean idleTimeoutSet;
183 private int idleTimeout;
184 private boolean hardTimeoutSet;
185 private int hardTimeout;
186 private boolean packetCountSet;
187 private U64 packetCount;
188 private boolean byteCountSet;
189 private U64 byteCount;
190 private boolean matchSet;
191 private Match match;
192
193 BuilderWithParent(OFFlowRemovedVer12 parentMessage) {
194 this.parentMessage = parentMessage;
195 }
196
197 @Override
198 public OFVersion getVersion() {
199 return OFVersion.OF_12;
200 }
201
202 @Override
203 public OFType getType() {
204 return OFType.FLOW_REMOVED;
205 }
206
207 @Override
208 public long getXid() {
209 return xid;
210 }
211
212 @Override
213 public OFFlowRemoved.Builder setXid(long xid) {
214 this.xid = xid;
215 this.xidSet = true;
216 return this;
217 }
218 @Override
219 public U64 getCookie() {
220 return cookie;
221 }
222
223 @Override
224 public OFFlowRemoved.Builder setCookie(U64 cookie) {
225 this.cookie = cookie;
226 this.cookieSet = true;
227 return this;
228 }
229 @Override
230 public int getPriority() {
231 return priority;
232 }
233
234 @Override
235 public OFFlowRemoved.Builder setPriority(int priority) {
236 this.priority = priority;
237 this.prioritySet = true;
238 return this;
239 }
240 @Override
241 public short getReason() {
242 return reason;
243 }
244
245 @Override
246 public OFFlowRemoved.Builder setReason(short reason) {
247 this.reason = reason;
248 this.reasonSet = true;
249 return this;
250 }
251 @Override
252 public TableId getTableId() {
253 return tableId;
254 }
255
256 @Override
257 public OFFlowRemoved.Builder setTableId(TableId tableId) {
258 this.tableId = tableId;
259 this.tableIdSet = true;
260 return this;
261 }
262 @Override
263 public long getDurationSec() {
264 return durationSec;
265 }
266
267 @Override
268 public OFFlowRemoved.Builder setDurationSec(long durationSec) {
269 this.durationSec = durationSec;
270 this.durationSecSet = true;
271 return this;
272 }
273 @Override
274 public long getDurationNsec() {
275 return durationNsec;
276 }
277
278 @Override
279 public OFFlowRemoved.Builder setDurationNsec(long durationNsec) {
280 this.durationNsec = durationNsec;
281 this.durationNsecSet = true;
282 return this;
283 }
284 @Override
285 public int getIdleTimeout() {
286 return idleTimeout;
287 }
288
289 @Override
290 public OFFlowRemoved.Builder setIdleTimeout(int idleTimeout) {
291 this.idleTimeout = idleTimeout;
292 this.idleTimeoutSet = true;
293 return this;
294 }
295 @Override
296 public int getHardTimeout() {
297 return hardTimeout;
298 }
299
300 @Override
301 public OFFlowRemoved.Builder setHardTimeout(int hardTimeout) {
302 this.hardTimeout = hardTimeout;
303 this.hardTimeoutSet = true;
304 return this;
305 }
306 @Override
307 public U64 getPacketCount() {
308 return packetCount;
309 }
310
311 @Override
312 public OFFlowRemoved.Builder setPacketCount(U64 packetCount) {
313 this.packetCount = packetCount;
314 this.packetCountSet = true;
315 return this;
316 }
317 @Override
318 public U64 getByteCount() {
319 return byteCount;
320 }
321
322 @Override
323 public OFFlowRemoved.Builder setByteCount(U64 byteCount) {
324 this.byteCount = byteCount;
325 this.byteCountSet = true;
326 return this;
327 }
328 @Override
329 public Match getMatch() {
330 return match;
331 }
332
333 @Override
334 public OFFlowRemoved.Builder setMatch(Match match) {
335 this.match = match;
336 this.matchSet = true;
337 return this;
338 }
339
340
341 @Override
342 public OFFlowRemoved build() {
343 long xid = this.xidSet ? this.xid : parentMessage.xid;
344 U64 cookie = this.cookieSet ? this.cookie : parentMessage.cookie;
345 if(cookie == null)
346 throw new NullPointerException("Property cookie must not be null");
347 int priority = this.prioritySet ? this.priority : parentMessage.priority;
348 short reason = this.reasonSet ? this.reason : parentMessage.reason;
349 TableId tableId = this.tableIdSet ? this.tableId : parentMessage.tableId;
350 if(tableId == null)
351 throw new NullPointerException("Property tableId must not be null");
352 long durationSec = this.durationSecSet ? this.durationSec : parentMessage.durationSec;
353 long durationNsec = this.durationNsecSet ? this.durationNsec : parentMessage.durationNsec;
354 int idleTimeout = this.idleTimeoutSet ? this.idleTimeout : parentMessage.idleTimeout;
355 int hardTimeout = this.hardTimeoutSet ? this.hardTimeout : parentMessage.hardTimeout;
356 U64 packetCount = this.packetCountSet ? this.packetCount : parentMessage.packetCount;
357 if(packetCount == null)
358 throw new NullPointerException("Property packetCount must not be null");
359 U64 byteCount = this.byteCountSet ? this.byteCount : parentMessage.byteCount;
360 if(byteCount == null)
361 throw new NullPointerException("Property byteCount must not be null");
362 Match match = this.matchSet ? this.match : parentMessage.match;
363 if(match == null)
364 throw new NullPointerException("Property match must not be null");
365
366 //
367 return new OFFlowRemovedVer12(
368 xid,
369 cookie,
370 priority,
371 reason,
372 tableId,
373 durationSec,
374 durationNsec,
375 idleTimeout,
376 hardTimeout,
377 packetCount,
378 byteCount,
379 match
380 );
381 }
382
383 }
384
385 static class Builder implements OFFlowRemoved.Builder {
386 // OF message fields
387 private boolean xidSet;
388 private long xid;
389 private boolean cookieSet;
390 private U64 cookie;
391 private boolean prioritySet;
392 private int priority;
393 private boolean reasonSet;
394 private short reason;
395 private boolean tableIdSet;
396 private TableId tableId;
397 private boolean durationSecSet;
398 private long durationSec;
399 private boolean durationNsecSet;
400 private long durationNsec;
401 private boolean idleTimeoutSet;
402 private int idleTimeout;
403 private boolean hardTimeoutSet;
404 private int hardTimeout;
405 private boolean packetCountSet;
406 private U64 packetCount;
407 private boolean byteCountSet;
408 private U64 byteCount;
409 private boolean matchSet;
410 private Match match;
411
412 @Override
413 public OFVersion getVersion() {
414 return OFVersion.OF_12;
415 }
416
417 @Override
418 public OFType getType() {
419 return OFType.FLOW_REMOVED;
420 }
421
422 @Override
423 public long getXid() {
424 return xid;
425 }
426
427 @Override
428 public OFFlowRemoved.Builder setXid(long xid) {
429 this.xid = xid;
430 this.xidSet = true;
431 return this;
432 }
433 @Override
434 public U64 getCookie() {
435 return cookie;
436 }
437
438 @Override
439 public OFFlowRemoved.Builder setCookie(U64 cookie) {
440 this.cookie = cookie;
441 this.cookieSet = true;
442 return this;
443 }
444 @Override
445 public int getPriority() {
446 return priority;
447 }
448
449 @Override
450 public OFFlowRemoved.Builder setPriority(int priority) {
451 this.priority = priority;
452 this.prioritySet = true;
453 return this;
454 }
455 @Override
456 public short getReason() {
457 return reason;
458 }
459
460 @Override
461 public OFFlowRemoved.Builder setReason(short reason) {
462 this.reason = reason;
463 this.reasonSet = true;
464 return this;
465 }
466 @Override
467 public TableId getTableId() {
468 return tableId;
469 }
470
471 @Override
472 public OFFlowRemoved.Builder setTableId(TableId tableId) {
473 this.tableId = tableId;
474 this.tableIdSet = true;
475 return this;
476 }
477 @Override
478 public long getDurationSec() {
479 return durationSec;
480 }
481
482 @Override
483 public OFFlowRemoved.Builder setDurationSec(long durationSec) {
484 this.durationSec = durationSec;
485 this.durationSecSet = true;
486 return this;
487 }
488 @Override
489 public long getDurationNsec() {
490 return durationNsec;
491 }
492
493 @Override
494 public OFFlowRemoved.Builder setDurationNsec(long durationNsec) {
495 this.durationNsec = durationNsec;
496 this.durationNsecSet = true;
497 return this;
498 }
499 @Override
500 public int getIdleTimeout() {
501 return idleTimeout;
502 }
503
504 @Override
505 public OFFlowRemoved.Builder setIdleTimeout(int idleTimeout) {
506 this.idleTimeout = idleTimeout;
507 this.idleTimeoutSet = true;
508 return this;
509 }
510 @Override
511 public int getHardTimeout() {
512 return hardTimeout;
513 }
514
515 @Override
516 public OFFlowRemoved.Builder setHardTimeout(int hardTimeout) {
517 this.hardTimeout = hardTimeout;
518 this.hardTimeoutSet = true;
519 return this;
520 }
521 @Override
522 public U64 getPacketCount() {
523 return packetCount;
524 }
525
526 @Override
527 public OFFlowRemoved.Builder setPacketCount(U64 packetCount) {
528 this.packetCount = packetCount;
529 this.packetCountSet = true;
530 return this;
531 }
532 @Override
533 public U64 getByteCount() {
534 return byteCount;
535 }
536
537 @Override
538 public OFFlowRemoved.Builder setByteCount(U64 byteCount) {
539 this.byteCount = byteCount;
540 this.byteCountSet = true;
541 return this;
542 }
543 @Override
544 public Match getMatch() {
545 return match;
546 }
547
548 @Override
549 public OFFlowRemoved.Builder setMatch(Match match) {
550 this.match = match;
551 this.matchSet = true;
552 return this;
553 }
554//
555 @Override
556 public OFFlowRemoved build() {
557 long xid = this.xidSet ? this.xid : DEFAULT_XID;
558 U64 cookie = this.cookieSet ? this.cookie : DEFAULT_COOKIE;
559 if(cookie == null)
560 throw new NullPointerException("Property cookie must not be null");
561 int priority = this.prioritySet ? this.priority : DEFAULT_PRIORITY;
562 short reason = this.reasonSet ? this.reason : DEFAULT_REASON;
563 TableId tableId = this.tableIdSet ? this.tableId : DEFAULT_TABLE_ID;
564 if(tableId == null)
565 throw new NullPointerException("Property tableId must not be null");
566 long durationSec = this.durationSecSet ? this.durationSec : DEFAULT_DURATION_SEC;
567 long durationNsec = this.durationNsecSet ? this.durationNsec : DEFAULT_DURATION_NSEC;
568 int idleTimeout = this.idleTimeoutSet ? this.idleTimeout : DEFAULT_IDLE_TIMEOUT;
569 int hardTimeout = this.hardTimeoutSet ? this.hardTimeout : DEFAULT_HARD_TIMEOUT;
570 U64 packetCount = this.packetCountSet ? this.packetCount : DEFAULT_PACKET_COUNT;
571 if(packetCount == null)
572 throw new NullPointerException("Property packetCount must not be null");
573 U64 byteCount = this.byteCountSet ? this.byteCount : DEFAULT_BYTE_COUNT;
574 if(byteCount == null)
575 throw new NullPointerException("Property byteCount must not be null");
576 Match match = this.matchSet ? this.match : DEFAULT_MATCH;
577 if(match == null)
578 throw new NullPointerException("Property match must not be null");
579
580
581 return new OFFlowRemovedVer12(
582 xid,
583 cookie,
584 priority,
585 reason,
586 tableId,
587 durationSec,
588 durationNsec,
589 idleTimeout,
590 hardTimeout,
591 packetCount,
592 byteCount,
593 match
594 );
595 }
596
597 }
598
599
600 final static Reader READER = new Reader();
601 static class Reader implements OFMessageReader<OFFlowRemoved> {
602 @Override
603 public OFFlowRemoved readFrom(ChannelBuffer bb) throws OFParseError {
604 int start = bb.readerIndex();
605 // fixed value property version == 3
606 byte version = bb.readByte();
607 if(version != (byte) 0x3)
608 throw new OFParseError("Wrong version: Expected=OFVersion.OF_12(3), got="+version);
609 // fixed value property type == 11
610 byte type = bb.readByte();
611 if(type != (byte) 0xb)
612 throw new OFParseError("Wrong type: Expected=OFType.FLOW_REMOVED(11), got="+type);
613 int length = U16.f(bb.readShort());
614 if(length < MINIMUM_LENGTH)
615 throw new OFParseError("Wrong length: Expected to be >= " + MINIMUM_LENGTH + ", was: " + length);
616 if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
617 // Buffer does not have all data yet
618 bb.readerIndex(start);
619 return null;
620 }
621 if(logger.isTraceEnabled())
622 logger.trace("readFrom - length={}", length);
623 long xid = U32.f(bb.readInt());
624 U64 cookie = U64.ofRaw(bb.readLong());
625 int priority = U16.f(bb.readShort());
626 short reason = U8.f(bb.readByte());
627 TableId tableId = TableId.readByte(bb);
628 long durationSec = U32.f(bb.readInt());
629 long durationNsec = U32.f(bb.readInt());
630 int idleTimeout = U16.f(bb.readShort());
631 int hardTimeout = U16.f(bb.readShort());
632 U64 packetCount = U64.ofRaw(bb.readLong());
633 U64 byteCount = U64.ofRaw(bb.readLong());
634 Match match = ChannelUtilsVer12.readOFMatch(bb);
635
636 OFFlowRemovedVer12 flowRemovedVer12 = new OFFlowRemovedVer12(
637 xid,
638 cookie,
639 priority,
640 reason,
641 tableId,
642 durationSec,
643 durationNsec,
644 idleTimeout,
645 hardTimeout,
646 packetCount,
647 byteCount,
648 match
649 );
650 if(logger.isTraceEnabled())
651 logger.trace("readFrom - read={}", flowRemovedVer12);
652 return flowRemovedVer12;
653 }
654 }
655
656 public void putTo(PrimitiveSink sink) {
657 FUNNEL.funnel(this, sink);
658 }
659
660 final static OFFlowRemovedVer12Funnel FUNNEL = new OFFlowRemovedVer12Funnel();
661 static class OFFlowRemovedVer12Funnel implements Funnel<OFFlowRemovedVer12> {
662 private static final long serialVersionUID = 1L;
663 @Override
664 public void funnel(OFFlowRemovedVer12 message, PrimitiveSink sink) {
665 // fixed value property version = 3
666 sink.putByte((byte) 0x3);
667 // fixed value property type = 11
668 sink.putByte((byte) 0xb);
669 // FIXME: skip funnel of length
670 sink.putLong(message.xid);
671 message.cookie.putTo(sink);
672 sink.putInt(message.priority);
673 sink.putShort(message.reason);
674 message.tableId.putTo(sink);
675 sink.putLong(message.durationSec);
676 sink.putLong(message.durationNsec);
677 sink.putInt(message.idleTimeout);
678 sink.putInt(message.hardTimeout);
679 message.packetCount.putTo(sink);
680 message.byteCount.putTo(sink);
681 message.match.putTo(sink);
682 }
683 }
684
685
686 public void writeTo(ChannelBuffer bb) {
687 WRITER.write(bb, this);
688 }
689
690 final static Writer WRITER = new Writer();
691 static class Writer implements OFMessageWriter<OFFlowRemovedVer12> {
692 @Override
693 public void write(ChannelBuffer bb, OFFlowRemovedVer12 message) {
694 int startIndex = bb.writerIndex();
695 // fixed value property version = 3
696 bb.writeByte((byte) 0x3);
697 // fixed value property type = 11
698 bb.writeByte((byte) 0xb);
699 // length is length of variable message, will be updated at the end
700 int lengthIndex = bb.writerIndex();
701 bb.writeShort(U16.t(0));
702
703 bb.writeInt(U32.t(message.xid));
704 bb.writeLong(message.cookie.getValue());
705 bb.writeShort(U16.t(message.priority));
706 bb.writeByte(U8.t(message.reason));
707 message.tableId.writeByte(bb);
708 bb.writeInt(U32.t(message.durationSec));
709 bb.writeInt(U32.t(message.durationNsec));
710 bb.writeShort(U16.t(message.idleTimeout));
711 bb.writeShort(U16.t(message.hardTimeout));
712 bb.writeLong(message.packetCount.getValue());
713 bb.writeLong(message.byteCount.getValue());
714 message.match.writeTo(bb);
715
716 // update length field
717 int length = bb.writerIndex() - startIndex;
718 bb.setShort(lengthIndex, length);
719
720 }
721 }
722
723 @Override
724 public String toString() {
725 StringBuilder b = new StringBuilder("OFFlowRemovedVer12(");
726 b.append("xid=").append(xid);
727 b.append(", ");
728 b.append("cookie=").append(cookie);
729 b.append(", ");
730 b.append("priority=").append(priority);
731 b.append(", ");
732 b.append("reason=").append(reason);
733 b.append(", ");
734 b.append("tableId=").append(tableId);
735 b.append(", ");
736 b.append("durationSec=").append(durationSec);
737 b.append(", ");
738 b.append("durationNsec=").append(durationNsec);
739 b.append(", ");
740 b.append("idleTimeout=").append(idleTimeout);
741 b.append(", ");
742 b.append("hardTimeout=").append(hardTimeout);
743 b.append(", ");
744 b.append("packetCount=").append(packetCount);
745 b.append(", ");
746 b.append("byteCount=").append(byteCount);
747 b.append(", ");
748 b.append("match=").append(match);
749 b.append(")");
750 return b.toString();
751 }
752
753 @Override
754 public boolean equals(Object obj) {
755 if (this == obj)
756 return true;
757 if (obj == null)
758 return false;
759 if (getClass() != obj.getClass())
760 return false;
761 OFFlowRemovedVer12 other = (OFFlowRemovedVer12) obj;
762
763 if( xid != other.xid)
764 return false;
765 if (cookie == null) {
766 if (other.cookie != null)
767 return false;
768 } else if (!cookie.equals(other.cookie))
769 return false;
770 if( priority != other.priority)
771 return false;
772 if( reason != other.reason)
773 return false;
774 if (tableId == null) {
775 if (other.tableId != null)
776 return false;
777 } else if (!tableId.equals(other.tableId))
778 return false;
779 if( durationSec != other.durationSec)
780 return false;
781 if( durationNsec != other.durationNsec)
782 return false;
783 if( idleTimeout != other.idleTimeout)
784 return false;
785 if( hardTimeout != other.hardTimeout)
786 return false;
787 if (packetCount == null) {
788 if (other.packetCount != null)
789 return false;
790 } else if (!packetCount.equals(other.packetCount))
791 return false;
792 if (byteCount == null) {
793 if (other.byteCount != null)
794 return false;
795 } else if (!byteCount.equals(other.byteCount))
796 return false;
797 if (match == null) {
798 if (other.match != null)
799 return false;
800 } else if (!match.equals(other.match))
801 return false;
802 return true;
803 }
804
805 @Override
806 public int hashCode() {
807 final int prime = 31;
808 int result = 1;
809
810 result = prime * (int) (xid ^ (xid >>> 32));
811 result = prime * result + ((cookie == null) ? 0 : cookie.hashCode());
812 result = prime * result + priority;
813 result = prime * result + reason;
814 result = prime * result + ((tableId == null) ? 0 : tableId.hashCode());
815 result = prime * (int) (durationSec ^ (durationSec >>> 32));
816 result = prime * (int) (durationNsec ^ (durationNsec >>> 32));
817 result = prime * result + idleTimeout;
818 result = prime * result + hardTimeout;
819 result = prime * result + ((packetCount == null) ? 0 : packetCount.hashCode());
820 result = prime * result + ((byteCount == null) ? 0 : byteCount.hashCode());
821 result = prime * result + ((match == null) ? 0 : match.hashCode());
822 return result;
823 }
824
825}