OpenSplice Java 5 DCPS  v6.x
OpenSplice Java 5 OpenSplice Data Distribution Service Data-Centric Publish-Subscribe API
All Classes Namespaces Files Functions Variables Pages
Sample.java
Go to the documentation of this file.
1 /* Copyright 2010, Object Management Group, Inc.
2  * Copyright 2010, PrismTech, Inc.
3  * Copyright 2010, Real-Time Innovations, Inc.
4  * All rights reserved.
5  *
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  */
18 
19 package org.omg.dds.sub;
20 
21 import java.io.Serializable;
22 import java.util.ListIterator;
23 
24 import org.omg.dds.core.DDSObject;
26 import org.omg.dds.core.Time;
27 
28 
116 public interface Sample<TYPE> extends Cloneable, Serializable, DDSObject
117 {
118  // -----------------------------------------------------------------------
119  // Methods
120  // -----------------------------------------------------------------------
121 
122  // --- Sample data: ------------------------------------------------------
123 
150  public TYPE getData();
151 
152 
153  // --- Sample meta-data: -------------------------------------------------
154 
175  public SampleState getSampleState();
176 
206  public ViewState getViewState();
207 
257  public Time getSourceTimestamp();
270 
294  public int getDisposedGenerationCount();
295 
319  public int getNoWritersGenerationCount();
320 
340  public int getSampleRank();
341 
370  public int getGenerationRank();
371 
406  public int getAbsoluteGenerationRank();
407 
408 
409  // --- From Object: ------------------------------------------------------
410 
411  public Sample<TYPE> clone();
412 
413 
414 
415  // -----------------------------------------------------------------------
416  // Types
417  // -----------------------------------------------------------------------
418 
419  public static interface Iterator<IT_DATA>
420  extends java.io.Closeable, ListIterator<Sample<IT_DATA>> {
448  @Override
449  public abstract void close() throws java.io.IOException;
450 
451  // --- From ListIterator: --------------------------------------------
455  @Override
456  public void remove();
457 
461  @Override
462  public void set(Sample<IT_DATA> o);
463 
467  @Override
468  public void add(Sample<IT_DATA> o);
469  }
470 
471 }
Sample< TYPE > clone()
A Sample represents an atom of data information (i.e., one value for one instance) as returned by a o...
Definition: Sample.java:116
For each instance the Data Distribution Service internally maintains an InstanceState.
void add(Sample< IT_DATA > o)
For each sample, the Data Distribution Service internally maintains a SampleState specific to each Da...
abstract void close()
This operation indicates to that the application is done accessing the list of Samples obtained by so...
InstanceState getInstanceState()
For each instance the middleware internally maintains an instanceState.
int getAbsoluteGenerationRank()
The sampleRank and generationRank available in the Sample are computed based solely on the actual sam...
InstanceHandle getInstanceHandle()
Gets the InstanceHandle of the associated data Sample.
int getSampleRank()
The sampleRank and generationRank available in the Sample are computed based solely on the actual sam...
int getDisposedGenerationCount()
For each instance the middleware internally maintains two counts: the disposedGenerationCount and noW...
int getGenerationRank()
The sampleRank and generationRank available in the Sample are computed based solely on the actual sam...
Time getSourceTimestamp()
Gets the timestamp of the sample.
An opaque handle that can be used to refer to a local or remote entity.
TYPE getData()
Get the data associated with this Sample, if any.
A supertype of all DDS classes and interfaces.
Definition: DDSObject.java:25
ViewState getViewState()
For each instance (identified by the key), the middleware internally maintains a viewState relative t...
For each instance (identified by the key), the Data Distribution Service internally maintains a ViewS...
Definition: ViewState.java:26
InstanceHandle getPublicationHandle()
Gets the InstanceHandle of the associated publication.
SampleState getSampleState()
For each sample received, the middleware internally maintains a sampleState relative to each org...
A moment in time expressed with nanosecond precision (though not necessarily nanosecond accuracy)...
Definition: Time.java:34
int getNoWritersGenerationCount()
For each instance the middleware internally maintains two counts: the disposedGenerationCount and noW...