Class WaitingTagsManager
This class is used to manage waiting tags state.
public class WaitingTagsManager
- Inheritance
-
WaitingTagsManager
- Inherited Members
Remarks
This class is used to manage waiting tags state. Any tag in the structure tree could be marked as "waiting". This state indicates that tag is not yet finished and therefore should not be flushed or removed if page tags are flushed or removed or if parent tags are flushed.
Waiting state of tags is defined by the association with arbitrary objects instances. Waiting state could also be perceived as a temporal association of the object to some particular tag.Methods
AssignWaitingState(TagTreePointer, object)
Assigns waiting state to the tag at which given TagTreePointer points, associating it with the given object.
public virtual object AssignWaitingState(TagTreePointer pointerToTag, object associatedObj)
Parameters
pointerToTag
TagTreePointera TagTreePointer pointing at a tag which is desired to be marked as waiting.
associatedObj
objectan object that is to be associated with the waiting tag. A null value is forbidden.
Returns
- object
the previous associated object with the tag if it has already had waiting state, or null if it was not waiting tag.
Remarks
Assigns waiting state to the tag at which given TagTreePointer points, associating it with the given object . If current tag of the given TagTreePointer is already waiting, then after this method call it's associated object will change to the one passed as the argument and the old one will not longer be an associated object.
IsObjectAssociatedWithWaitingTag(object)
Checks if there is waiting tag which state was assigned using given object.
public virtual bool IsObjectAssociatedWithWaitingTag(object obj)
Parameters
obj
objectan object which is to be checked if it is associated with any waiting tag. A null value is forbidden.
Returns
- bool
true if object is currently associated with some waiting tag.
RemoveAllWaitingStates()
Removes waiting state of all waiting tags by removing association with objects.
public virtual void RemoveAllWaitingStates()
Remarks
Removes waiting state of all waiting tags by removing association with objects.
NOTE: if parent of the waiting tag is already flushed, the tag and it's children will be also immediately flushed right after the waiting state removal.RemoveWaitingState(object)
Removes waiting state of the tag which is associated with the given object.
public virtual bool RemoveWaitingState(object associatedObject)
Parameters
associatedObject
objectan object which association with the waiting tag is to be removed.
Returns
- bool
true if object was actually associated with some tag and it's association was removed.
Remarks
Removes waiting state of the tag which is associated with the given object.
NOTE: if parent of the waiting tag is already flushed, the tag and it's children (unless they are waiting tags on their own) will be also immediately flushed right after the waiting state removal.TryMovePointerToWaitingTag(TagTreePointer, object)
Moves given TagTreePointer to the waiting tag which is associated with the given object.
public virtual bool TryMovePointerToWaitingTag(TagTreePointer tagPointer, object associatedObject)
Parameters
tagPointer
TagTreePointera TagTreePointer which position in the tree is to be changed to the waiting tag in case of the successful call.
associatedObject
objectan object which is associated with the waiting tag to which TagTreePointer is to be moved.
Returns
- bool
true if given object is actually associated with the waiting tag and TagTreePointer was moved in order to point at it.
Remarks
Moves given TagTreePointer to the waiting tag which is associated with the given object. If the passed object is not associated with any waiting tag, TagTreePointer position won't change.