org.globus.mds.aggregator.impl
Class AggregatorServiceGroupResource

java.lang.Object
  extended byorg.globus.mds.aggregator.impl.AggregatorServiceGroupResource
All Implemented Interfaces:
org.globus.wsrf.RemoveCallback, org.globus.wsrf.Resource, org.globus.wsrf.ResourceProperties, ServiceGroupRegistrationResource, ServiceGroupResource
Direct Known Subclasses:
IndexResource, TriggerResource

public class AggregatorServiceGroupResource
extends Object
implements org.globus.wsrf.ResourceProperties, org.globus.wsrf.RemoveCallback, ServiceGroupRegistrationResource

Implements an aggregating in-memory service group resource.
Entries will be stored in a hash table under each service group resource so that we can easily find them; the key for a service group entry must first contain the key to the appropriate service group and then the key within that to the appropriate entry.


Field Summary
static long DEFAULT_SWEEP_PERIOD
          The default entry sweeper, in milliseconds.
static QName REGISTRATION_COUNT_RP
           
static QName RP_SET
           
 
Constructor Summary
AggregatorServiceGroupResource()
           
 
Method Summary
 void addAggregatorSource(AggregatorSource source)
           
protected  long decrementCurrent()
           
 AggregatorConfiguration getConfiguration()
           
protected  long getCurrentRegCount()
           
 org.globus.wsrf.ResourceKey getKey()
           
protected  long getLifetimeRegTotal()
           
 org.globus.wsrf.ResourcePropertySet getResourcePropertySet()
           
protected  long incrementCurrent()
           
protected  long incrementTotal()
           
protected  void init(QName rpSetName)
           
 Iterator iterateEntryKeys()
          Provide an iterator that will return ResourceKeys that are valid in the context of the entry home
 Iterator iterateEntryValues()
          Provide an iterator to a java.util.Set for getting the runtime entry Resource instances directly.
 void loadCompatibleSources(AggregatorSink sink)
           
 void notifyChange()
           
 void remove()
           
protected  void removeAllEntryResources()
           
protected  void removeEntryResource(org.globus.wsrf.ResourceKey entryResourceKey)
           
 EndpointReferenceType serviceGroupAdd(org.oasis.wsrf.servicegroup.Add add)
          Adds a registration to the AggregatingServiceGroup.
 void setVersion(String version)
           
 void unloadSources()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_SWEEP_PERIOD

public static final long DEFAULT_SWEEP_PERIOD
The default entry sweeper, in milliseconds.

See Also:
Constant Field Values

RP_SET

public static final QName RP_SET

REGISTRATION_COUNT_RP

public static final QName REGISTRATION_COUNT_RP
Constructor Detail

AggregatorServiceGroupResource

public AggregatorServiceGroupResource()
Method Detail

init

protected void init(QName rpSetName)

addAggregatorSource

public void addAggregatorSource(AggregatorSource source)

getResourcePropertySet

public org.globus.wsrf.ResourcePropertySet getResourcePropertySet()
Specified by:
getResourcePropertySet in interface org.globus.wsrf.ResourceProperties

setVersion

public void setVersion(String version)

getKey

public org.globus.wsrf.ResourceKey getKey()

iterateEntryKeys

public Iterator iterateEntryKeys()
Description copied from interface: ServiceGroupResource
Provide an iterator that will return ResourceKeys that are valid in the context of the entry home

Specified by:
iterateEntryKeys in interface ServiceGroupResource

iterateEntryValues

public Iterator iterateEntryValues()
Description copied from interface: ServiceGroupResource
Provide an iterator to a java.util.Set for getting the runtime entry Resource instances directly. The element returned by the iterator is of the type Map.Entry

Specified by:
iterateEntryValues in interface ServiceGroupResource

getLifetimeRegTotal

protected long getLifetimeRegTotal()

getCurrentRegCount

protected long getCurrentRegCount()

incrementTotal

protected long incrementTotal()

incrementCurrent

protected long incrementCurrent()

decrementCurrent

protected long decrementCurrent()

getConfiguration

public AggregatorConfiguration getConfiguration()

loadCompatibleSources

public void loadCompatibleSources(AggregatorSink sink)
                           throws Exception
Throws:
Exception

unloadSources

public void unloadSources()

serviceGroupAdd

public EndpointReferenceType serviceGroupAdd(org.oasis.wsrf.servicegroup.Add add)
                                      throws RemoteException,
                                             org.oasis.wsrf.servicegroup.AddRefusedFaultType,
                                             org.oasis.wsrf.servicegroup.ContentCreationFailedFaultType,
                                             org.oasis.wsrf.servicegroup.UnsupportedMemberInterfaceFaultType
Adds a registration to the AggregatingServiceGroup. This has two main effects:
  1. it creates a service group entry for the registration (normal service group behaviour)
  2. it calls addAggregation on the specified source, passing in the newly created entry. TODO: should we pass in a key here rather than a reference to the service object in order to cope with activation/deactivation?

Specified by:
serviceGroupAdd in interface ServiceGroupRegistrationResource
Throws:
RemoteException
org.oasis.wsrf.servicegroup.AddRefusedFaultType
org.oasis.wsrf.servicegroup.ContentCreationFailedFaultType
org.oasis.wsrf.servicegroup.UnsupportedMemberInterfaceFaultType

notifyChange

public void notifyChange()

removeEntryResource

protected void removeEntryResource(org.globus.wsrf.ResourceKey entryResourceKey)

removeAllEntryResources

protected void removeAllEntryResources()

remove

public void remove()
Specified by:
remove in interface org.globus.wsrf.RemoveCallback


Copyright © 1999-2006 University of Chicago. All rights reserved.