TYPE
- The concrete type of the data to be published over the
the topic.public interface DataWriter<TYPE> extends DomainEntity<DataWriterListener<TYPE>,DataWriterQos>
Topic
.
A DataWriter is attached to exactly one Publisher
that acts as a
factory for it. A DataWriter is bound to exactly one Topic and therefore
to exactly one data type. The Topic must exist prior to the DataWriter's
creation.
All operations except for the inherited operations
Entity.setQos(org.omg.dds.core.EntityQos)
, Entity.getQos()
,
Entity.setListener(java.util.EventListener)
,Entity.getListener()
,
Entity.enable()
, getStatusCondition()
, and Entity.close()
may
fail with the exception NotEnabledException
.Modifier and Type | Method and Description |
---|---|
void |
assertLiveliness()
This operation manually asserts the liveliness of the DataWriter.
|
<OTHER> DataWriter<OTHER> |
cast()
Cast this data writer to the given type, or throw an exception if
the cast fails.
|
void |
dispose(InstanceHandle instanceHandle)
This operation requests the middleware to delete the data (the actual
deletion is postponed until there is no more use for that data in the
whole system).
|
void |
dispose(InstanceHandle instanceHandle,
TYPE instanceData)
This operation requests the middleware to delete the data (the actual
deletion is postponed until there is no more use for that data in the
whole system).
|
void |
dispose(InstanceHandle instanceHandle,
TYPE instanceData,
long sourceTimestamp,
TimeUnit unit)
This operation performs the same functions as
dispose(InstanceHandle, Object) except that the application
provides the value for the source time stamp that is made available to
DataReader objects by means of
Sample.getSourceTimestamp() . |
void |
dispose(InstanceHandle instanceHandle,
TYPE instanceData,
Time sourceTimestamp)
This operation performs the same functions as
dispose(InstanceHandle, Object) except that the application
provides the value for the source time stamp that is made available to
DataReader objects by means of
Sample.getSourceTimestamp() . |
TYPE |
getKeyValue(InstanceHandle handle)
This operation can be used to retrieve the instance key that
corresponds to an instance handle.
|
TYPE |
getKeyValue(TYPE keyHolder,
InstanceHandle handle)
This operation can be used to retrieve the instance key that
corresponds to an instance handle.
|
LivelinessLostStatus |
getLivelinessLostStatus()
This operation allows access to the LIVELINESS_LOST communication
status.
|
SubscriptionBuiltinTopicData |
getMatchedSubscriptionData(InstanceHandle subscriptionHandle)
This operation retrieves information on a subscription that is
currently "associated" with the DataWriter; that is, a subscription
with a matching
Topic and compatible QoS that the application
has not indicated should be "ignored" by means of
DomainParticipant.ignoreSubscription(InstanceHandle) . |
Set<InstanceHandle> |
getMatchedSubscriptions()
This operation retrieves the list of subscriptions currently
"associated" with the DataWriter; that is, subscriptions that have a
matching
Topic and compatible QoS that the application has not
indicated should be "ignored" by means of
DomainParticipant.ignoreSubscription(InstanceHandle) . |
OfferedDeadlineMissedStatus |
getOfferedDeadlineMissedStatus()
This operation allows access to the OFFERED_DEADLINE_MISSED
communication status.
|
OfferedIncompatibleQosStatus |
getOfferedIncompatibleQosStatus()
This operation allows access to the OFFERED_INCOMPATIBLE_QOS
communication status.
|
Publisher |
getParent() |
PublicationMatchedStatus |
getPublicationMatchedStatus()
This operation allows access to the PUBLICATION_MATCHED
communication status.
|
StatusCondition<DataWriter<TYPE>> |
getStatusCondition()
This operation allows access to the
StatusCondition associated
with the Entity. |
Topic<TYPE> |
getTopic() |
ModifiableInstanceHandle |
lookupInstance(ModifiableInstanceHandle handle,
TYPE keyHolder)
This operation takes as a parameter an instance and returns a handle
that can be used in subsequent operations that accept an instance
handle as an argument.
|
InstanceHandle |
lookupInstance(TYPE keyHolder)
This operation takes as a parameter an instance and returns a handle
that can be used in subsequent operations that accept an instance
handle as an argument.
|
InstanceHandle |
registerInstance(TYPE instanceData)
This operation informs the Service that the application will be
modifying a particular instance.
|
InstanceHandle |
registerInstance(TYPE instanceData,
long sourceTimestamp,
TimeUnit unit)
This operation performs the same function as
registerInstance(Object) and can be used instead in the cases
where the application desires to specify the value for the source
time stamp. |
InstanceHandle |
registerInstance(TYPE instanceData,
Time sourceTimestamp)
This operation performs the same function as
registerInstance(Object) and can be used instead in the cases
where the application desires to specify the value for the source
time stamp. |
void |
unregisterInstance(InstanceHandle handle)
This operation reverses the action of
registerInstance(Object) . |
void |
unregisterInstance(InstanceHandle handle,
TYPE instanceData)
This operation reverses the action of
registerInstance(Object) . |
void |
unregisterInstance(InstanceHandle handle,
TYPE instanceData,
long sourceTimestamp,
TimeUnit unit)
This operation performs the same function as
unregisterInstance(InstanceHandle, Object) and can be used
instead in the cases where the application desires to specify the
value for the source time stamp. |
void |
unregisterInstance(InstanceHandle handle,
TYPE instanceData,
Time sourceTimestamp)
This operation performs the same function as
unregisterInstance(InstanceHandle, Object) and can be used
instead in the cases where the application desires to specify the
value for the source time stamp. |
void |
waitForAcknowledgments(Duration maxWait)
This operation is intended to be used only if the DataWriter has
Reliability.getKind() set to
Reliability.Kind.RELIABLE . |
void |
waitForAcknowledgments(long maxWait,
TimeUnit unit)
This operation is intended to be used only if the DataWriter has
Reliability.getKind() set to
Reliability.Kind.RELIABLE . |
void |
write(TYPE instanceData)
This operation modifies the value of a data instance.
|
void |
write(TYPE instanceData,
InstanceHandle handle)
This operation modifies the value of a data instance.
|
void |
write(TYPE instanceData,
InstanceHandle handle,
long sourceTimestamp,
TimeUnit unit)
This operation performs the same function as
write(Object, InstanceHandle) except that it also provides
the value for the source time stamp that is made available to
DataReader objects by means of
Sample.getSourceTimestamp() . |
void |
write(TYPE instanceData,
InstanceHandle handle,
Time sourceTimestamp)
This operation performs the same function as
write(Object, InstanceHandle) except that it also provides
the value for the source time stamp that is made available to
DataReader objects by means of
Sample.getSourceTimestamp() . |
void |
write(TYPE instanceData,
long sourceTimestamp,
TimeUnit unit) |
void |
write(TYPE instanceData,
Time sourceTimestamp) |
close, enable, getInstanceHandle, getListener, getQos, getStatusChanges, retain, setListener, setListener, setQos, setQos
getEnvironment
<OTHER> DataWriter<OTHER> cast()
OTHER
- The type of the data published by this writer,
according to the caller.ClassCastException
- if the cast failsTopic<TYPE> getTopic()
Topic
associated with the DataWriter. This is the
same Topic that was used to create the DataWriter.void waitForAcknowledgments(Duration maxWait) throws TimeoutException
Reliability.getKind()
set to
Reliability.Kind.RELIABLE
.
Otherwise the operation will return immediately.
The operation blocks the calling thread until either all data written
by the DataWriter is acknowledged by all matched DataReader
entities that have
Reliability.getKind()
set to
Reliability.Kind.RELIABLE
,
or else the duration
specified by the maxWait parameter elapses, whichever happens first.
A normal return indicates that all the samples written have been
acknowledged by all reliable matched data readers.TimeoutException
- if maxWait elapsed before all the data
was acknowledged.void waitForAcknowledgments(long maxWait, TimeUnit unit) throws TimeoutException
Reliability.getKind()
set to
Reliability.Kind.RELIABLE
.
Otherwise the operation will return immediately.
The operation blocks the calling thread until either all data written
by the DataWriter is acknowledged by all matched DataReader
entities that have
Reliability.getKind()
set to
Reliability.Kind.RELIABLE
,
or else the duration
specified by the maxWait parameter elapses, whichever happens first.
A normal return indicates that all the samples written have been
acknowledged by all reliable matched data readers.TimeoutException
- if maxWait elapsed before all the data
was acknowledged.LivelinessLostStatus getLivelinessLostStatus()
org.omg.dds.core.status
OfferedDeadlineMissedStatus getOfferedDeadlineMissedStatus()
org.omg.dds.core.status
OfferedIncompatibleQosStatus getOfferedIncompatibleQosStatus()
org.omg.dds.core.status
PublicationMatchedStatus getPublicationMatchedStatus()
org.omg.dds.core.status
void assertLiveliness()
Liveliness
to
indicate to the Service that the entity remains active.
This operation need only be used if
Liveliness.getKind()
is either
Liveliness.Kind.MANUAL_BY_PARTICIPANT
or
Liveliness.Kind.MANUAL_BY_TOPIC
.
Otherwise, it has no effect.
Note - Writing data via write(Object)
asserts
liveliness on the DataWriter itself and its DomainParticipant.
Consequently the use of assertLiveliness is only needed if the
application is not writing data regularly.Set<InstanceHandle> getMatchedSubscriptions()
Topic
and compatible QoS that the application has not
indicated should be "ignored" by means of
DomainParticipant.ignoreSubscription(InstanceHandle)
.
The handles returned in the 'subscriptionHandles' list are the ones
that are used by the DDS implementation to locally identify the
corresponding matched DataReader
entities. These handles match
the ones that appear in Sample.getInstanceHandle()
when
reading the "DCPSSubscriptions" built-in topic.
The operation may fail if the infrastructure does not locally maintain
the connectivity information.getMatchedSubscriptionData(InstanceHandle)
SubscriptionBuiltinTopicData getMatchedSubscriptionData(InstanceHandle subscriptionHandle)
Topic
and compatible QoS that the application
has not indicated should be "ignored" by means of
DomainParticipant.ignoreSubscription(InstanceHandle)
.
The operation getMatchedSubscriptions()
can be used
to find the subscriptions that are currently matched with the
DataWriter.subscriptionHandle
- a handle to the subscription, the
data of which is to be retrieved.IllegalArgumentException
- if subscriptionHandle does
not correspond to a subscription currently associated with
the DataWriter.UnsupportedOperationException
- if the infrastructure does
not hold the information necessary to fill in the
subscriptionData.getMatchedSubscriptions()
InstanceHandle registerInstance(TYPE instanceData) throws TimeoutException
write(Object)
or
dispose(InstanceHandle)
operations.
This operation should be invoked prior to calling any operation that
modifies the instance.
A nil handle may be returned by the Service if it does not want to
allocate any handle for that instance.
This operation may block and exit with TimeoutException
under
the same circumstances described for the write(Object)
.
The operation is idempotent. If it is called for an already registered
instance, it just returns the already allocated handle. This may be
used to lookup and retrieve the handle allocated to a given instance.
The explicit use of this operation is optional as the application may
call directly the write operation and specify a nil handle to indicate
that the 'key' should be examined to identify the instance.OutOfResourcesException
- under the same circumstances
described for write(Object)
.TimeoutException
- under the same circumstances
described for write(Object)
.registerInstance(Object, Time)
,
registerInstance(Object, long, TimeUnit)
,
unregisterInstance(InstanceHandle)
,
unregisterInstance(InstanceHandle, Object)
,
InstanceHandle.nilHandle(org.omg.dds.core.ServiceEnvironment)
InstanceHandle registerInstance(TYPE instanceData, Time sourceTimestamp) throws TimeoutException
registerInstance(Object)
and can be used instead in the cases
where the application desires to specify the value for the source
time stamp. The source time stamp potentially affects the relative
order in which readers observe events from multiple writers. For
details see DestinationOrder
.
This operation may block and exit with TimeoutException
under
the same circumstances described for the write(Object)
.OutOfResourcesException
- under the same circumstances
described for write(Object)
.TimeoutException
- under the same circumstances
described for write(Object)
.registerInstance(Object)
,
registerInstance(Object, long, TimeUnit)
,
unregisterInstance(InstanceHandle, Object, Time)
InstanceHandle registerInstance(TYPE instanceData, long sourceTimestamp, TimeUnit unit) throws TimeoutException
registerInstance(Object)
and can be used instead in the cases
where the application desires to specify the value for the source
time stamp. The source time stamp potentially affects the relative
order in which readers observe events from multiple writers. For
details see DestinationOrder
.
This operation may block and exit with TimeoutException
under
the same circumstances described for the write(Object)
.OutOfResourcesException
- under the same circumstances
described for write(Object)
.TimeoutException
- under the same circumstances
described for write(Object)
.registerInstance(Object)
,
registerInstance(Object, Time)
,
unregisterInstance(InstanceHandle, Object, long, TimeUnit)
void unregisterInstance(InstanceHandle handle) throws TimeoutException
registerInstance(Object)
. It should only be called on an
instance that is currently registered.
The operation should be called just once per instance, regardless of
how many times registerInstance(Object)
was called for that
instance.
This operation informs the Service that the DataWriter is not
intending to modify that data instance any more. This operation also
indicates that the Service can locally remove all information
regarding that instance. The application should not attempt to use the
handle previously allocated to that instance after calling
unregisterInstance(InstanceHandle)
.
If handle is any value other than nil, then it must correspond to the
value returned by registerInstance(Object)
when the instance
(identified by its key) was registered.
If after that, the application wants to modify (write or dispose) the
instance, it has to register it again, or else use a nil handle.
This operation does not indicate that the instance is deleted (that is
the purpose of dispose). The operation just indicates that the
DataWriter no longer has 'anything to say' about the instance.
DataReader entities that are reading the instance will eventually
receive a sample with a InstanceState.NOT_ALIVE_NO_WRITERS
instance state if no other DataWriter entities are writing the
instance.
This operation can affect the ownership of the data instance (see
Ownership
). If the DataWriter was the exclusive owner
of the instance, then calling this method will relinquish that
ownership.
This operation may block and exit with TimeoutException
under
the same circumstances described for the write(Object)
.IllegalArgumentException
- if the handle does not correspond
to an existing instance, and if this situation is detectable
by the Service implementation. If the situation is not
detectable, the behavior is unspecified.TimeoutException
unregisterInstance(InstanceHandle, Object)
,
unregisterInstance(InstanceHandle, Object, Time)
,
unregisterInstance(InstanceHandle, Object, long, TimeUnit)
,
registerInstance(Object)
void unregisterInstance(InstanceHandle handle, TYPE instanceData) throws TimeoutException
registerInstance(Object)
. It should only be called on an
instance that is currently registered.
The operation should be called just once per instance, regardless of
how many times registerInstance(Object)
was called for that
instance.
This operation informs the Service that the DataWriter is not
intending to modify that data instance any more. This operation also
indicates that the Service can locally remove all information
regarding that instance. The application should not attempt to use the
handle previously allocated to that instance after calling
unregisterInstance(InstanceHandle)
.
A nil handle can be used for the parameter handle. This indicates that
the identity of the instance should be automatically deduced from the
instance data (by means of the key).
If handle is any value other than nil, then it must correspond to the
value returned by registerInstance(Object)
when the instance
(identified by its key) was registered.
If after that, the application wants to modify (write or dispose) the
instance, it has to register it again, or else use a nil handle.
This operation does not indicate that the instance is deleted (that is
the purpose of dispose). The operation just indicates that the
DataWriter no longer has 'anything to say' about the instance.
DataReader entities that are reading the instance will eventually
receive a sample with a InstanceState.NOT_ALIVE_NO_WRITERS
instance state if no other DataWriter entities are writing the
instance.
This operation can affect the ownership of the data instance (see
Ownership
). If the DataWriter was the exclusive owner
of the instance, then calling this method will relinquish that
ownership.
This operation may block and exit with TimeoutException
under
the same circumstances described for the write(Object)
.IllegalArgumentException
- if the handle does not correspond
to an existing instance, and if this situation is detectable
by the Service implementation. If the situation is not
detectable, the behavior is unspecified.PreconditionNotMetException
- if the handle corresponds to an
existing instance but does not correspond to the same
instance referred by the instancData parameter, and if this
situation is detectable by the Service implementation If the
situation is not detectable, the behavior is unspecified.TimeoutException
unregisterInstance(InstanceHandle)
,
unregisterInstance(InstanceHandle, Object, Time)
,
unregisterInstance(InstanceHandle, Object, long, TimeUnit)
,
registerInstance(Object)
,
InstanceHandle.nilHandle(org.omg.dds.core.ServiceEnvironment)
void unregisterInstance(InstanceHandle handle, TYPE instanceData, Time sourceTimestamp) throws TimeoutException
unregisterInstance(InstanceHandle, Object)
and can be used
instead in the cases where the application desires to specify the
value for the source time stamp. The source time stamp potentially
affects the relative order in which readers observe events from
multiple writers. For details see DestinationOrder
.
The constraints on the values of the handle parameter and the
corresponding error behavior are the same specified for the
unregisterInstance(InstanceHandle, Object)
operation.
This operation may block and exit with TimeoutException
under
the same circumstances described for the write(Object)
.void unregisterInstance(InstanceHandle handle, TYPE instanceData, long sourceTimestamp, TimeUnit unit) throws TimeoutException
unregisterInstance(InstanceHandle, Object)
and can be used
instead in the cases where the application desires to specify the
value for the source time stamp. The source time stamp potentially
affects the relative order in which readers observe events from
multiple writers. For details see DestinationOrder
.
The constraints on the values of the handle parameter and the
corresponding error behavior are the same specified for the
unregisterInstance(InstanceHandle, Object)
operation.
This operation may block and exit with TimeoutException
under
the same circumstances described for the write(Object)
.void write(TYPE instanceData) throws TimeoutException
DataReader
objects by means of Sample.getSourceTimestamp()
. See also
DestinationOrder
.
As a side effect, this operation asserts liveliness on the DataWriter
itself, the Publisher
and the DomainParticipant
.
If Reliability.getKind()
kind
is set to
Reliability.Kind.RELIABLE
,
the operation may block if
the modification would cause data to be lost or else cause one of the
limits specified in ResourceLimits
to be exceeded.
Under these circumstances,
Reliability.getMaxBlockingTime()
configures the
maximum time the operation may block waiting for space to become
available. If this duration elapses before the DataWriter is able to
store the modification without exceeding the limits, the operation
will fail with TimeoutException
.
Specifically, the DataWriter write operation may block in the
following situations (note that the list may not be exhaustive), even
if History.getKind()
is
History.Kind.KEEP_LAST
.
ResourceLimits.getMaxSamples()
<
ResourceLimits.getMaxInstances()
*
History.getDepth()
),
then in the situation
where the max samples resource limit is exhausted the Service
is allowed to discard samples of some other instance as long
as at least one sample remains for such an instance. If it is
still not possible to make space available to store the
modification, the writer is allowed to block.ResourceLimits.getMaxSamples()
<
ResourceLimits.getMaxInstances()
), then the
DataWriter may block regardless of the HISTORY depth.OutOfResourcesException
provided the following two
conditions are met:
OutOfResourcesException
- if it is not possible for
sufficient resources to be made available within the
configured max blocking time.TimeoutException
- if the configured maximum
time elapses and the DataWriter is still unable to store the
new sample without exceeding its configured resource limits.write(Object, InstanceHandle)
,
write(Object, InstanceHandle, Time)
,
write(Object, InstanceHandle, long, TimeUnit)
void write(TYPE instanceData, Time sourceTimestamp) throws TimeoutException
TimeoutException
void write(TYPE instanceData, long sourceTimestamp, TimeUnit unit) throws TimeoutException
TimeoutException
void write(TYPE instanceData, InstanceHandle handle) throws TimeoutException
DataReader
objects by means of Sample.getSourceTimestamp()
. See also
DestinationOrder
.
As a side effect, this operation asserts liveliness on the DataWriter
itself, the Publisher
and the DomainParticipant
.
A nil handle can be used for the parameter handle. This indicates that
the identity of the instance should be automatically deduced from the
instanceData (by means of the key). If handle is not nil, then it must
correspond to the value returned by registerInstance(Object)
when the instance (identified by its key) was registered.
If Reliability.getKind()
kind
is set to
Reliability.Kind.RELIABLE
,
the operation may block if
the modification would cause data to be lost or else cause one of the
limits specified in ResourceLimits
to be exceeded.
Under these circumstances,
Reliability.getMaxBlockingTime()
configures the
maximum time the operation may block waiting for space to become
available. If this duration elapses before the DataWriter is able to
store the modification without exceeding the limits, the operation
will fail with TimeoutException
.
Specifically, the DataWriter write operation may block in the
following situations (note that the list may not be exhaustive), even
if History.getKind()
is
History.Kind.KEEP_LAST
.
ResourceLimits.getMaxSamples()
<
ResourceLimits.getMaxInstances()
*
History.getDepth()
),
then in the situation
where the max samples resource limit is exhausted the Service
is allowed to discard samples of some other instance as long
as at least one sample remains for such an instance. If it is
still not possible to make space available to store the
modification, the writer is allowed to block.ResourceLimits.getMaxSamples()
<
ResourceLimits.getMaxInstances()
), then the
DataWriter may block regardless of the HISTORY depth.OutOfResourcesException
provided the following two
conditions are met:
IllegalArgumentException
- if the handle does not correspond
to an existing instance, and if this situation is detectable
by the Service implementation. If the situation is not
detectable, the behavior is unspecified.PreconditionNotMetException
- if the handle corresponds to an
existing instance but does not correspond to the same
instance referred by the instancData parameter, and if this
situation is detectable by the Service implementation If the
situation is not detectable, the behavior is unspecified.OutOfResourcesException
- if it is not possible for
sufficient resources to be made available within the
configured max blocking time.TimeoutException
- if the configured maximum
time elapses and the DataWriter is still unable to store the
new sample without exceeding its configured resource limits.write(Object)
,
write(Object, InstanceHandle, Time)
,
write(Object, InstanceHandle, long, TimeUnit)
,
InstanceHandle.nilHandle(org.omg.dds.core.ServiceEnvironment)
void write(TYPE instanceData, InstanceHandle handle, Time sourceTimestamp) throws TimeoutException
write(Object, InstanceHandle)
except that it also provides
the value for the source time stamp that is made available to
DataReader
objects by means of
Sample.getSourceTimestamp()
. See also
DestinationOrder
.
The constraints on the values of the handle parameter and the
corresponding error behavior are the same specified for
write(Object, InstanceHandle)
.
This operation may block and exit with TimeoutException
under
the same circumstances described for
write(Object, InstanceHandle)
.IllegalArgumentException
- under the same circumstances as
write(Object, InstanceHandle)
.PreconditionNotMetException
- under the same circumstances as
write(Object, InstanceHandle)
.OutOfResourcesException
- under the same circumstances as
write(Object, InstanceHandle)
.TimeoutException
- under the same circumstances as
write(Object, InstanceHandle)
.write(Object)
,
write(Object, InstanceHandle)
,
write(Object, InstanceHandle, long, TimeUnit)
void write(TYPE instanceData, InstanceHandle handle, long sourceTimestamp, TimeUnit unit) throws TimeoutException
write(Object, InstanceHandle)
except that it also provides
the value for the source time stamp that is made available to
DataReader
objects by means of
Sample.getSourceTimestamp()
. See also
DestinationOrder
.
The constraints on the values of the handle parameter and the
corresponding error behavior are the same specified for
write(Object, InstanceHandle)
.
This operation may block and exit with TimeoutException
under
the same circumstances described for
write(Object, InstanceHandle)
.IllegalArgumentException
- under the same circumstances as
write(Object, InstanceHandle)
.PreconditionNotMetException
- under the same circumstances as
write(Object, InstanceHandle)
.OutOfResourcesException
- under the same circumstances as
write(Object, InstanceHandle)
.TimeoutException
- under the same circumstances as
write(Object, InstanceHandle)
.write(Object)
,
write(Object, InstanceHandle)
,
write(Object, InstanceHandle, Time)
void dispose(InstanceHandle instanceHandle) throws TimeoutException
DataReader
objects that already
knew that instance. DataReader objects that didn't know the instance
will never see it.
When this operation is used, the Service will automatically supply the
value of the source time stamp that is made available to DataReader
objects by means of Sample.getSourceTimestamp()
.
The constraints on the values of the instanceHandle parameter and the
corresponding error behavior are the same specified for
unregisterInstance(InstanceHandle)
.
This operation may block and exit with TimeoutException
under
the same circumstances described for write(Object)
.OutOfResourcesException
- under the same circumstances as
write(Object)
.TimeoutException
- under the same circumstances as
write(Object)
.dispose(InstanceHandle, Object)
,
dispose(InstanceHandle, Object, Time)
,
dispose(InstanceHandle, Object, long, TimeUnit)
void dispose(InstanceHandle instanceHandle, TYPE instanceData) throws TimeoutException
DataReader
objects that already
knew that instance. DataReader objects that didn't know the instance
will never see it.
This operation does not modify the value of the instance. The
instanceData parameter is passed just for the purposes of identifying
the instance.
When this operation is used, the Service will automatically supply the
value of the source time stamp that is made available to DataReader
objects by means of Sample.getSourceTimestamp()
.
The constraints on the values of the instanceHandle parameter and the
corresponding error behavior are the same specified for
unregisterInstance(InstanceHandle, Object)
.
This operation may block and exit with TimeoutException
under
the same circumstances described for
write(Object, InstanceHandle)
.OutOfResourcesException
- under the same circumstances as
write(Object, InstanceHandle)
.TimeoutException
- under the same circumstances as
write(Object, InstanceHandle)
.dispose(InstanceHandle)
,
dispose(InstanceHandle, Object, Time)
,
dispose(InstanceHandle, Object, long, TimeUnit)
void dispose(InstanceHandle instanceHandle, TYPE instanceData, Time sourceTimestamp) throws TimeoutException
dispose(InstanceHandle, Object)
except that the application
provides the value for the source time stamp that is made available to
DataReader
objects by means of
Sample.getSourceTimestamp()
.
The constraints on the values of the instanceHandle parameter and the
corresponding error behavior are the same specified for
dispose(InstanceHandle, Object)
.
This operation may block and exit with TimeoutException
under
the same circumstances described for
write(Object, InstanceHandle)
.IllegalArgumentException
- under the same circumstances as
dispose(InstanceHandle, Object)
.PreconditionNotMetException
- under the same circumstances as
dispose(InstanceHandle, Object)
.OutOfResourcesException
- under the same circumstances as
write(Object, InstanceHandle)
.TimeoutException
- under the same circumstances as
write(Object, InstanceHandle)
.dispose(InstanceHandle)
,
dispose(InstanceHandle, Object)
,
dispose(InstanceHandle, Object, long, TimeUnit)
void dispose(InstanceHandle instanceHandle, TYPE instanceData, long sourceTimestamp, TimeUnit unit) throws TimeoutException
dispose(InstanceHandle, Object)
except that the application
provides the value for the source time stamp that is made available to
DataReader
objects by means of
Sample.getSourceTimestamp()
.
The constraints on the values of the instanceHandle parameter and the
corresponding error behavior are the same specified for
dispose(InstanceHandle, Object)
.
This operation may block and exit with TimeoutException
under
the same circumstances described for
write(Object, InstanceHandle)
.IllegalArgumentException
- under the same circumstances as
dispose(InstanceHandle, Object)
.PreconditionNotMetException
- under the same circumstances as
dispose(InstanceHandle, Object)
.OutOfResourcesException
- under the same circumstances as
write(Object, InstanceHandle)
.TimeoutException
- under the same circumstances as
write(Object, InstanceHandle)
.dispose(InstanceHandle)
,
dispose(InstanceHandle, Object)
,
dispose(InstanceHandle, Object, Time)
TYPE getKeyValue(TYPE keyHolder, InstanceHandle handle)
keyHolder
- a container, into which this method shall
place its result.handle
- a handle indicating the instance whose value
this method should get.IllegalArgumentException
- if the handle does not correspond
to an existing data object known to the DataWriter. If the
implementation is not able to check invalid handles, then the
result in this situation is unspecified.getKeyValue(InstanceHandle)
TYPE getKeyValue(InstanceHandle handle)
handle
- a handle indicating the instance whose value
this method should get.IllegalArgumentException
- if the handle does not correspond
to an existing data object known to the DataWriter. If the
implementation is not able to check invalid handles, then the
result in this situation is unspecified.getKeyValue(Object, InstanceHandle)
ModifiableInstanceHandle lookupInstance(ModifiableInstanceHandle handle, TYPE keyHolder)
handle
- a container, into which this method shall place its
result.keyHolder
- a sample of the instance whose handle this
method should look up.lookupInstance(Object)
InstanceHandle lookupInstance(TYPE keyHolder)
keyHolder
- a sample of the instance whose handle this
method should look up.lookupInstance(ModifiableInstanceHandle, Object)
StatusCondition<DataWriter<TYPE>> getStatusCondition()
Entity
StatusCondition
associated
with the Entity. The returned condition can then be added to a
WaitSet
so that the application can wait for specific status
changes that affect the Entity.getStatusCondition
in interface Entity<DataWriterListener<TYPE>,DataWriterQos>
Publisher getParent()
getParent
in interface DomainEntity<DataWriterListener<TYPE>,DataWriterQos>
Copyright © 2014. All rights reserved.