01: /*
02: * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
03: */
04: package com.tc.object.dna.api;
05:
06: /**
07: * A logical action representing a method invocation to be replayed elsewhere. The method
08: * signatures can only come from a limited set, which are defined in {@link com.tc.object.SerializationUtil}.
09: */
10: public class LogicalAction {
11: private final int method;
12: private final Object[] parameters;
13:
14: /**
15: * Construct a logical action with the method identifier and parameter values
16: * @param method Method identifier, as defined in {@link com.tc.object.SerializationUtil}
17: * @param parameters Parameters to the method call, may be empty but not null
18: */
19: public LogicalAction(int method, Object[] parameters) {
20: this .method = method;
21: this .parameters = parameters;
22: }
23:
24: /**
25: * Get method identifier
26: * @return Method identifier, as defined in {@link com.tc.object.SerializationUtil}
27: */
28: public int getMethod() {
29: return method;
30: }
31:
32: /**
33: * Get parameter values
34: * @return The parameters, never null
35: */
36: public Object[] getParameters() {
37: return parameters;
38: }
39:
40: }
|