com.gigaspaces.grid.worker
Class AbstractSpaceWorker

java.lang.Object
  extended by com.gigaspaces.grid.worker.AbstractSpaceWorker
All Implemented Interfaces:
GigaSpaceWorker, java.lang.Runnable
Direct Known Subclasses:
TaskWorker

public abstract class AbstractSpaceWorker
extends java.lang.Object
implements GigaSpaceWorker

The AsbtractSpaceWorker provides a framework upon which to build support for a GigaSpaceWorker.


Field Summary
static java.lang.String COMPONENT
           
 
Constructor Summary
AbstractSpaceWorker()
           
 
Method Summary
 long getBackLog(net.jini.space.JavaSpace space, net.jini.core.entry.Entry template)
          Get the backlog from the GigaSpace
 int getID()
          Get the id
 net.jini.space.JavaSpace getSpace()
          Get the JavaSpace
protected  java.lang.String getStackTraceAsString(java.lang.Throwable t)
           
 org.jini.rio.watch.Watch getWatch(java.lang.String watchID)
          Get a Watch which matches the ID provided
 org.jini.rio.watch.WatchRegistry getWatchRegistry()
          Get the the WatchRegistry
 void setID(int id)
          Set the identifier for the GigaSpaceWorker
 void setSpace(net.jini.space.JavaSpace space)
          Set the JavaSpace for the worker.
 void setWatchRegistry(org.jini.rio.watch.WatchRegistry watchRegistry)
          Set the WatchRegistry
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.gigaspaces.grid.worker.GigaSpaceWorker
shutdown
 
Methods inherited from interface java.lang.Runnable
run
 

Field Detail

COMPONENT

public static final java.lang.String COMPONENT
See Also:
Constant Field Values
Constructor Detail

AbstractSpaceWorker

public AbstractSpaceWorker()
Method Detail

setID

public void setID(int id)
Description copied from interface: GigaSpaceWorker
Set the identifier for the GigaSpaceWorker

Specified by:
setID in interface GigaSpaceWorker
See Also:
GigaSpaceWorker.setID(int)

getID

public int getID()
Get the id


setSpace

public void setSpace(net.jini.space.JavaSpace space)
Description copied from interface: GigaSpaceWorker
Set the JavaSpace for the worker.

Specified by:
setSpace in interface GigaSpaceWorker
See Also:
GigaSpaceWorker.setSpace(JavaSpace)

getSpace

public net.jini.space.JavaSpace getSpace()
Get the JavaSpace


getWatch

public org.jini.rio.watch.Watch getWatch(java.lang.String watchID)
Get a Watch which matches the ID provided

Parameters:
watchID - The identifier for a Watch
Returns:
A Watch for the ID. If there is no Watch which matches the ID, return null

setWatchRegistry

public void setWatchRegistry(org.jini.rio.watch.WatchRegistry watchRegistry)
Description copied from interface: GigaSpaceWorker
Set the WatchRegistry

Specified by:
setWatchRegistry in interface GigaSpaceWorker
See Also:
GigaSpaceWorker.setWatchRegistry(org.jini.rio.watch.WatchRegistry)

getWatchRegistry

public org.jini.rio.watch.WatchRegistry getWatchRegistry()
Description copied from interface: GigaSpaceWorker
Get the the WatchRegistry

Specified by:
getWatchRegistry in interface GigaSpaceWorker
See Also:
GigaSpaceWorker.getWatchRegistry()

getBackLog

public long getBackLog(net.jini.space.JavaSpace space,
                       net.jini.core.entry.Entry template)
                throws java.rmi.RemoteException,
                       net.jini.core.transaction.TransactionException,
                       net.jini.core.entry.UnusableEntryException
Get the backlog from the GigaSpace

Parameters:
space - - The Space
template - - Template
Throws:
java.rmi.RemoteException
net.jini.core.transaction.TransactionException
net.jini.core.entry.UnusableEntryException

getStackTraceAsString

protected java.lang.String getStackTraceAsString(java.lang.Throwable t)


Copyright (c) 2007 GigaSpaces Technologies, Inc.
All Rights Reserved.