GigaSpaces XAP 7.0 API

com.j_spaces.core.client
Class MulticastNotifyDelegator

java.lang.Object
  extended by com.j_spaces.core.client.MulticastNotifyDelegator
All Implemented Interfaces:
Runnable

Deprecated. Use EventSessionFactory instead.

@Deprecated
public class MulticastNotifyDelegator
extends Object
implements Runnable

Presently, JavaSpace.notify() implemented using unicast approach. This approach has significant drawbacks when number of notify templates is huge or number of fired events is huge. Also, JavaSpaces has ability to identify equal templates. MulticastNotifyDelegator is intended to solve both of those problems in direct and indirect ways.

Version:
4.5
Author:
Igor Goldenberg
See Also:
INotifyDelegatorFilter

Field Summary
protected  Thread _delegatorThread
          Deprecated. notify delegator thread.
protected  com.j_spaces.core.client.MulticastNotifyDelegator.MulticastEventReceiver _multicastReceiver
          Deprecated. multicast thread event receiver.
protected  IJSpace _spaceProxy
          Deprecated.  
protected static long DEFAULT_REPLY_TIMEOUT
          Deprecated. max time out to get registration confirmation.
 
Method Summary
 void close()
          Deprecated. close Multicast channels and unregister all templates.
protected  void finalize()
          Deprecated. Called by GC on clean reference.
static MulticastNotifyDelegator getInstance(IJSpace space)
          Deprecated. Returns single instance of MulticastNotifyDelegator per space.
protected  com.j_spaces.worker.multicast.MulticastCommandEntry getMutlicastCommandEntry(Object template, long lease, com.gigaspaces.events.NotifyInfo info)
          Deprecated. Create unique MulticastCommandEntry with Unique ID and Filter UID Part of UID is: - Template Object - Notify Mask

Even in the different JVM, the template UID will be the same, because MarshalledObject generates the same hashcode depends the template context.

 net.jini.core.event.EventRegistration notify(net.jini.core.entry.Entry template, net.jini.core.transaction.Transaction txn, net.jini.core.event.RemoteEventListener listener, long lease, MarshalledObject handback, boolean fifoEnabled, int notifyMask)
          Deprecated. register notify template with desired filter.
 net.jini.core.event.EventRegistration notify(net.jini.core.entry.Entry template, net.jini.core.transaction.Transaction txn, net.jini.core.event.RemoteEventListener listener, long lease, MarshalledObject handback, boolean fifoEnabled, int notifyMask, INotifyDelegatorFilter filter)
          Deprecated.  
 net.jini.core.event.EventRegistration notify(Object template, net.jini.core.transaction.Transaction txn, long lease, com.gigaspaces.events.NotifyInfo info)
          Deprecated. register notify template with desired filter.
 void run()
          Deprecated.  
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_spaceProxy

protected IJSpace _spaceProxy
Deprecated. 

_multicastReceiver

protected com.j_spaces.core.client.MulticastNotifyDelegator.MulticastEventReceiver _multicastReceiver
Deprecated. 
multicast thread event receiver.


_delegatorThread

protected Thread _delegatorThread
Deprecated. 
notify delegator thread.


DEFAULT_REPLY_TIMEOUT

protected static final long DEFAULT_REPLY_TIMEOUT
Deprecated. 
max time out to get registration confirmation.

See Also:
Constant Field Values
Method Detail

getInstance

public static MulticastNotifyDelegator getInstance(IJSpace space)
                                            throws RemoteException
Deprecated. 
Returns single instance of MulticastNotifyDelegator per space.

Parameters:
space - The space proxy.
Returns:
Returns instance of MulticastNotifyDelegator.
Throws:
RemoteException - Failed to initialize MulticastNotifyDelegator, or if the passed space proxy is null.

run

public void run()
Deprecated. 
Specified by:
run in interface Runnable

getMutlicastCommandEntry

protected com.j_spaces.worker.multicast.MulticastCommandEntry getMutlicastCommandEntry(Object template,
                                                                                       long lease,
                                                                                       com.gigaspaces.events.NotifyInfo info)
                                                                                throws IOException
Deprecated. 
Create unique MulticastCommandEntry with Unique ID and Filter UID Part of UID is: - Template Object - Notify Mask

Even in the different JVM, the template UID will be the same, because MarshalledObject generates the same hashcode depends the template context. So we are relying on MarshalledObject hashCode.

Parameters:
template - The notify template.
lease - The template lease.
Returns:
The initialized MulticastCommandEntry.
Throws:
IOException - Failed to generate Unique ID( cause is MarshalledObject ).

notify

public net.jini.core.event.EventRegistration notify(net.jini.core.entry.Entry template,
                                                    net.jini.core.transaction.Transaction txn,
                                                    net.jini.core.event.RemoteEventListener listener,
                                                    long lease,
                                                    MarshalledObject handback,
                                                    boolean fifoEnabled,
                                                    int notifyMask)
                                             throws net.jini.core.transaction.TransactionException,
                                                    RemoteException
Deprecated. 
register notify template with desired filter.

Throws:
net.jini.core.transaction.TransactionException
RemoteException

notify

public net.jini.core.event.EventRegistration notify(net.jini.core.entry.Entry template,
                                                    net.jini.core.transaction.Transaction txn,
                                                    net.jini.core.event.RemoteEventListener listener,
                                                    long lease,
                                                    MarshalledObject handback,
                                                    boolean fifoEnabled,
                                                    int notifyMask,
                                                    INotifyDelegatorFilter filter)
                                             throws net.jini.core.transaction.TransactionException,
                                                    RemoteException
Deprecated. 
Throws:
net.jini.core.transaction.TransactionException
RemoteException

notify

public net.jini.core.event.EventRegistration notify(Object template,
                                                    net.jini.core.transaction.Transaction txn,
                                                    long lease,
                                                    com.gigaspaces.events.NotifyInfo info)
                                             throws net.jini.core.transaction.TransactionException,
                                                    RemoteException
Deprecated. 
register notify template with desired filter.

Throws:
net.jini.core.transaction.TransactionException
RemoteException

close

public void close()
Deprecated. 
close Multicast channels and unregister all templates.


finalize

protected void finalize()
Deprecated. 
Called by GC on clean reference.

Overrides:
finalize in class Object

GigaSpaces XAP 7.0 API

Copyright © GigaSpaces.