01: /*
02: * All content copyright (c) 2003-2007 Terracotta, Inc., except as may otherwise be noted in a separate copyright
03: * notice. All rights reserved.
04: */
05: package com.tc.l2.msg;
06:
07: import com.tc.async.api.OrderedEventContext;
08: import com.tc.net.groups.AbstractGroupMessage;
09: import com.tc.util.Assert;
10:
11: import java.io.IOException;
12: import java.io.ObjectInput;
13: import java.io.ObjectOutput;
14:
15: public class ObjectSyncCompleteMessage extends AbstractGroupMessage
16: implements OrderedEventContext {
17:
18: public static final int OBJECT_SYNC_COMPLETE = 0x00;
19: private long sequence;
20:
21: // To make serialization happy
22: public ObjectSyncCompleteMessage() {
23: super (-1);
24: }
25:
26: public ObjectSyncCompleteMessage(int type, long sequence) {
27: super (type);
28: this .sequence = sequence;
29: }
30:
31: protected void basicReadExternal(int msgType, ObjectInput in)
32: throws IOException {
33: Assert.assertEquals(OBJECT_SYNC_COMPLETE, msgType);
34: this .sequence = in.readLong();
35: }
36:
37: protected void basicWriteExternal(int msgType, ObjectOutput out)
38: throws IOException {
39: Assert.assertEquals(OBJECT_SYNC_COMPLETE, msgType);
40: out.writeLong(this .sequence);
41: }
42:
43: public long getSequenceID() {
44: return this.sequence;
45: }
46:
47: }
|