org.globus.rendezvous.service
Class RendezvousResourceImpl

java.lang.Object
  extended byorg.globus.wsrf.impl.ReflectionResource
      extended byorg.globus.rendezvous.service.RendezvousResourceImpl
All Implemented Interfaces:
RendezvousResource, Resource, ResourceIdentifier, ResourceLifetime, ResourceProperties, TopicListAccessor

public class RendezvousResourceImpl
extends ReflectionResource
implements RendezvousResource, TopicListAccessor


Field Summary
private static org.globus.util.I18n i18n
           
private  byte[][] internalBinaryData
           
private static org.apache.commons.logging.Log logger
           
private static PerformanceLog performanceLogger
           
private static SimpleResourcePropertyMetaData RP_DATA_METADATA
           
private  int tally
           
private  TopicList topicList
           
 
Fields inherited from class org.globus.wsrf.impl.ReflectionResource
 
Constructor Summary
RendezvousResourceImpl()
           
 
Method Summary
private  void addData(int rank, byte[] data)
           
protected  ResourceProperty createNewResourceProperty(ResourcePropertyMetaData metaData, Object resourceBean)
           
private  int determineRank()
           
private  int getCapacity()
           
private  byte[][] getInternalBinaryData()
           
protected  RendezvousDataType getInternalRendezvousState()
          Used by derived types to obtain an XML-serializable form of the internal state of the rendezvous resource, for instance in order to passivate it to disk.
private  byte[] getMungedData()
          Create external, aggregated view of the data when all have registered
 TopicList getTopicList()
           
 void initialize(Object resourceBean, QName resourceElementQName, Object key)
           
protected  void initializeTopics()
          Called by initialize()
 boolean isFull()
           
private  void onBecomingFull()
           
 int register(byte[] data, int desiredRank)
          Register input data with rank.
protected  void setInternalRendezvousState(RendezvousDataType internalState)
          Used by derived classes to initialize the implementation state of the rendezvous resource.
private  void setRegistrantData(byte[] value)
           
private  void setRendezvousCompleted(boolean value)
           
private  void setRendezvousCompletedAndNotify(boolean isCompleted)
           
 
Methods inherited from class org.globus.wsrf.impl.ReflectionResource
createNewResourceProperty, getCurrentTime, getID, getResourceBean, getResourcePropertySet, getTerminationTime, setTerminationTime
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.globus.wsrf.ResourceProperties
getResourcePropertySet
 

Field Detail

RP_DATA_METADATA

private static final SimpleResourcePropertyMetaData RP_DATA_METADATA

tally

private int tally

internalBinaryData

private byte[][] internalBinaryData

topicList

private TopicList topicList

logger

private static final org.apache.commons.logging.Log logger

i18n

private static org.globus.util.I18n i18n

performanceLogger

private static PerformanceLog performanceLogger
Constructor Detail

RendezvousResourceImpl

public RendezvousResourceImpl()
Method Detail

initialize

public void initialize(Object resourceBean,
                       QName resourceElementQName,
                       Object key)
                throws ResourceException
Throws:
ResourceException

createNewResourceProperty

protected ResourceProperty createNewResourceProperty(ResourcePropertyMetaData metaData,
                                                     Object resourceBean)
                                              throws Exception
Throws:
Exception

initializeTopics

protected void initializeTopics()
Called by initialize()


setInternalRendezvousState

protected void setInternalRendezvousState(RendezvousDataType internalState)
Used by derived classes to initialize the implementation state of the rendezvous resource. For instance in case of a persistent resource, this function would be used in order to set the rendezvous internal state to what was saved and recovered.


getInternalRendezvousState

protected RendezvousDataType getInternalRendezvousState()
Used by derived types to obtain an XML-serializable form of the internal state of the rendezvous resource, for instance in order to passivate it to disk.

Returns:
RendezvousDataType

getMungedData

private byte[] getMungedData()
Create external, aggregated view of the data when all have registered

Returns:
byte[]

register

public int register(byte[] data,
                    int desiredRank)
             throws RankTakenFaultType
Description copied from interface: RendezvousResource
Register input data with rank.

Precondition: !isFull()

Specified by:
register in interface RendezvousResource
Parameters:
data - byte[] Binary data to register.
desiredRank - int Desired rank to associate with the registrant. Value of -1 implies that rank should be assigned automatically.
Returns:
int Rank of this registrant
Throws:
RankTakenFaultType

determineRank

private int determineRank()

addData

private void addData(int rank,
                     byte[] data)

onBecomingFull

private void onBecomingFull()

isFull

public boolean isFull()
Specified by:
isFull in interface RendezvousResource

getInternalBinaryData

private byte[][] getInternalBinaryData()

getTopicList

public TopicList getTopicList()
Specified by:
getTopicList in interface TopicListAccessor

getCapacity

private int getCapacity()

setRendezvousCompleted

private void setRendezvousCompleted(boolean value)

setRendezvousCompletedAndNotify

private void setRendezvousCompletedAndNotify(boolean isCompleted)

setRegistrantData

private void setRegistrantData(byte[] value)