Package org.jtrim2.concurrent.query
Class LinkedDataControl
java.lang.Object
org.jtrim2.concurrent.query.LinkedDataControl
Defines a
control object for
AsyncDataController instances controlling the data retrieval process
of two AsyncDataLink instances. AsyncDataController
implementations understanding this class will then send the
main control data to the AsyncDataLink
they consider the primary AsyncDataLink instance and the
secondary control data to the
AsyncDataLink instance they consider secondary.
Note that the AsyncDataLink instance created by the
AsyncLinks.convertResultAsync(AsyncDataLink, AsyncDataQuery) method
understands this class.
Thread safety
The methods of this class are safe to be accessed by multiple threads concurrently. Instances of this class cannot be directly modified, only its internal control objects if they are mutable. In case these control objects are immutable (and they are recommended to be so), then theLinkedDataControl instance is completely immutable.
Synchronization transparency
The methods of this class are synchronization transparent.-
Constructor Summary
ConstructorsConstructorDescriptionLinkedDataControl(Object mainControlData, Object secondaryControlData) Creates and initializes theLinkedDataControlinstance with the specified control objects. -
Method Summary
Modifier and TypeMethodDescriptionReturns the control object used to control the primaryAsyncDataLinkinstance.Returns the control object used to control the secondaryAsyncDataLinkinstance.toString()Returns the string representation of thisLinkedDataControlin no particular format.
-
Constructor Details
-
LinkedDataControl
Creates and initializes theLinkedDataControlinstance with the specified control objects.- Parameters:
mainControlData- the control object used to control the primaryAsyncDataLinkinstance. This argument cannot benull.secondaryControlData- the control object used to control the secondaryAsyncDataLinkinstance. This argument cannot benull.- Throws:
NullPointerException- thrown if any of the arguments isnull
-
-
Method Details
-
getMainControlData
Returns the control object used to control the primaryAsyncDataLinkinstance.- Returns:
- the control object used to control the primary
AsyncDataLinkinstance. This method never returnsnull.
-
getSecondaryControlData
Returns the control object used to control the secondaryAsyncDataLinkinstance.- Returns:
- the control object used to control the secondary
AsyncDataLinkinstance. This method never returnsnull.
-
toString
Returns the string representation of thisLinkedDataControlin no particular format. The string representation contains the string representation of both control objects.This method is intended to be used for debugging only.
-