org.jboss.cache.marshall
Class MethodCall

java.lang.Object
  extended by org.jgroups.blocks.MethodCall
      extended by org.jboss.cache.marshall.MethodCall
All Implemented Interfaces:
Externalizable, Serializable

Deprecated. - in favour of ReplicableCommand instances. Will be removed in 3.X.

@Deprecated
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 AT jboss DOT org)
See Also:
Serialized Form

Field Summary
 
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()
          Deprecated.  
protected MethodCall(Method method, int methodIdInteger, Object... arguments)
          Deprecated.  
protected MethodCall(Method method, Object... arguments)
          Deprecated.  
 
Method Summary
 short getId()
          Deprecated.  
 int getMethodId()
          Deprecated.  
 boolean isOnePhaseCommitPrepareMehod()
          Deprecated. This only works for prepare() and optimisticPrepare() method calls.
 void setMethodId(int id)
          Deprecated.  
 String toString()
          Deprecated.  
 
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
 

Constructor Detail

MethodCall

public MethodCall()
Deprecated. 

MethodCall

protected MethodCall(Method method,
                     Object... arguments)
Deprecated. 

MethodCall

protected MethodCall(Method method,
                     int methodIdInteger,
                     Object... arguments)
Deprecated. 
Method Detail

isOnePhaseCommitPrepareMehod

public boolean isOnePhaseCommitPrepareMehod()
Deprecated. 
This only works for prepare() and optimisticPrepare() method calls.


setMethodId

public void setMethodId(int id)
Deprecated. 

getMethodId

public int getMethodId()
Deprecated. 

getId

public short getId()
Deprecated. 
Overrides:
getId in class org.jgroups.blocks.MethodCall

toString

public String toString()
Deprecated. 
Overrides:
toString in class org.jgroups.blocks.MethodCall


Copyright © 2009 JBoss, a division of Red Hat. All Rights Reserved.