| java.lang.Object org.apache.axis2.context.AbstractContext
All known Subclasses: org.apache.axis2.context.OperationContext, org.apache.axis2.context.ConfigurationContext, org.apache.axis2.context.MessageContext, org.apache.axis2.context.ServiceGroupContext, org.apache.axis2.context.SessionContext, org.apache.axis2.context.ServiceContext,
AbstractContext | abstract public class AbstractContext (Code) | | This is the top most level of the Context hierarchy and is a bag of properties.
|
COPY_PROPERTIES | final public static String COPY_PROPERTIES(Code) | | Property used to indicate copying of properties is needed by context.
|
lastTouchedTime | protected long lastTouchedTime(Code) | | |
properties | protected transient Map properties(Code) | | |
AbstractContext | protected AbstractContext()(Code) | | |
clearPropertyDifferences | public synchronized void clearPropertyDifferences()(Code) | | Once the clustering mechanism transmits the property differences,
it should call this method to avoid retransmitting stuff that has already
been sent.
|
getLastTouchedTime | public long getLastTouchedTime()(Code) | | |
getProperty | public Object getProperty(String key)(Code) | | Retrieves an object given a key.
Parameters: key - - if not found, will return null Returns the property. |
getPropertyDifferences | public synchronized Map getPropertyDifferences()(Code) | | Get the property differences since the last transmission by the clustering
mechanism
The property differences |
getPropertyNames | public Iterator getPropertyNames()(Code) | | An iterator over a collection of String objects, which are the
keys in the properties object.
Iterator over a collection of keys |
getPropertyNonReplicable | public Object getPropertyNonReplicable(String key)(Code) | | Retrieves an object given a key. The retrieved property will not be replicated to
other nodes in the clustered scenario.
Parameters: key - - if not found, will return null Returns the property. |
mergeProperties | public void mergeProperties(Map props)(Code) | | This will do a copy of the given properties to the current properties
table.
Parameters: props - The table of properties to copy |
removeProperty | public synchronized void removeProperty(String key)(Code) | | Remove a property. Only properties at this level will be removed.
Properties of the parents cannot be removed using this method.
Parameters: key - |
removePropertyNonReplicable | public synchronized void removePropertyNonReplicable(String key)(Code) | | Remove a property. Only properties at this level will be removed.
Properties of the parents cannot be removed using this method.
The removal of the property will not be replicated when Axis2 is clustered.
Parameters: key - |
setLastTouchedTime | public void setLastTouchedTime(long t)(Code) | | |
setNonReplicableProperty | public void setNonReplicableProperty(String key, Object value)(Code) | | Store a property in this context.
But these properties should not be replicated when Axis2 is clustered.
Parameters: key - Parameters: value - |
setProperties | public void setProperties(Map properties)(Code) | | This will set the properties to the context. But in setting that one may need to "copy" all
the properties from the source properties to the target properties. To enable this we introduced
a property (
AbstractContext.COPY_PROPERTIES ) so that if set to true, this code
will copy the whole thing, without just referencing to the source.
Parameters: properties - |
setProperty | public void setProperty(String key, Object value)(Code) | | Store a property in this context
Parameters: key - Parameters: value - |
touch | protected void touch()(Code) | | ServiceContext and ServiceGroupContext are not getting automatically garbage collected. And there
is no specific way for some one to go and make it garbage collectible.
So the current solution is to make them time out. So the logic is that, there is a timer task
in each and every service group which will check for the last touched time. And if it has not
been touched for some time, the timer task will remove it from the memory.
The touching logic happens like this. Whenever there is a call to addMessageContext in the operationContext
it will go and update operationCOntext -> serviceContext -> serviceGroupContext.
|
|
|