org.jboss.cache.marshall
Class MethodCall
java.lang.Object
org.jgroups.blocks.MethodCall
org.jboss.cache.marshall.MethodCall
- All Implemented Interfaces:
- java.io.Externalizable, java.io.Serializable
public class MethodCall
- extends org.jgroups.blocks.MethodCall
An extension of the JGroups MethodCall class. The reason for this subclass is a minor
optimisation in the way method IDs are dealt with. The JGroups class of the same name uses
a short as a method id, which is more efficient as far as network streaming is concerned.
However, JBossCache uses this id for a lot of == and switch comparisons. Java, being an
integer oriented virtual machine, goes through a lot of extra steps when performing such simple
comparisons or arithmetic on non-integer numeric types.
See http://www.liemur.com/Articles/FineTuningJavaCode-IntOrientedMachine.html
Thanks to Elias Ross/genman for this info.
- Author:
- Manik Surtani (manik@jboss.org)
- See Also:
- Serialized Form
Fields inherited from class org.jgroups.blocks.MethodCall |
args, ID, log, method, METHOD, method_id, method_name, mode, OLD, payload, signature, SIGNATURE, types, TYPES |
Constructor Summary |
|
MethodCall()
|
protected |
MethodCall(java.lang.reflect.Method method,
int methodIdInteger,
java.lang.Object... arguments)
|
protected |
MethodCall(java.lang.reflect.Method method,
java.lang.Object... arguments)
|
Methods inherited from class org.jgroups.blocks.MethodCall |
get, getArgs, getMethod, getMode, getName, invoke, invoke, put, readExternal, setArgs, setId, setMethod, setName, toStringDetails, writeExternal |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
MethodCall
public MethodCall()
MethodCall
protected MethodCall(java.lang.reflect.Method method,
java.lang.Object... arguments)
MethodCall
protected MethodCall(java.lang.reflect.Method method,
int methodIdInteger,
java.lang.Object... arguments)
setMethodId
public void setMethodId(int id)
getMethodId
public int getMethodId()
getId
public short getId()
- Overrides:
getId
in class org.jgroups.blocks.MethodCall
toString
public java.lang.String toString()
- Overrides:
toString
in class org.jgroups.blocks.MethodCall