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.net.groups.AbstractGroupMessage;
08: import com.tc.net.groups.MessageID;
09: import com.tc.util.Assert;
10:
11: import java.io.ObjectInput;
12: import java.io.ObjectOutput;
13:
14: public class ObjectSyncResetMessage extends AbstractGroupMessage {
15:
16: public static final int REQUEST_RESET = 0x00;
17: public static final int OPERATION_SUCCESS = 0x01;
18:
19: // To make serialization happy
20: public ObjectSyncResetMessage() {
21: super (-1);
22: }
23:
24: public ObjectSyncResetMessage(int type) {
25: super (type);
26: }
27:
28: public ObjectSyncResetMessage(int type, MessageID reqID) {
29: super (type, reqID);
30: }
31:
32: protected void basicReadExternal(int msgType, ObjectInput in) {
33: Assert.assertTrue(msgType == REQUEST_RESET
34: || msgType == OPERATION_SUCCESS);
35: }
36:
37: protected void basicWriteExternal(int msgType, ObjectOutput out) {
38: Assert.assertTrue(msgType == REQUEST_RESET
39: || msgType == OPERATION_SUCCESS);
40: }
41:
42: public boolean isResetRequest() {
43: return getType() == REQUEST_RESET;
44: }
45:
46: }
|