Class ForwardingReadOnlyTransaction

  • All Implemented Interfaces:
    AutoCloseable, ReadOnlyTransaction, ReadTransaction, org.opendaylight.controller.md.sal.common.api.data.AsyncReadOnlyTransaction<org.opendaylight.yangtools.yang.binding.InstanceIdentifier<?>,​org.opendaylight.yangtools.yang.binding.DataObject>, org.opendaylight.controller.md.sal.common.api.data.AsyncReadTransaction<org.opendaylight.yangtools.yang.binding.InstanceIdentifier<?>,​org.opendaylight.yangtools.yang.binding.DataObject>, org.opendaylight.controller.md.sal.common.api.data.AsyncTransaction<org.opendaylight.yangtools.yang.binding.InstanceIdentifier<?>,​org.opendaylight.yangtools.yang.binding.DataObject>, org.opendaylight.yangtools.concepts.Identifiable<Object>

    @Deprecated(forRemoval=true)
    public class ForwardingReadOnlyTransaction
    extends com.google.common.collect.ForwardingObject
    implements ReadOnlyTransaction
    Deprecated, for removal: This API element is subject to removal in a future version.
    Use org.opendaylight.mdsal.binding.spi.ForwardingReadTransaction instead.
    Utility ReadOnlyTransaction implementation which forwards all interface method invocation to a delegate instance.
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      void close()
      Deprecated, for removal: This API element is subject to removal in a future version.
       
      protected ReadTransaction delegate()
      Deprecated, for removal: This API element is subject to removal in a future version.
       
      com.google.common.util.concurrent.CheckedFuture<Boolean,​org.opendaylight.controller.md.sal.common.api.data.ReadFailedException> exists​(org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType store, org.opendaylight.yangtools.yang.binding.InstanceIdentifier<?> path)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Checks if data is available in the logical data store located at provided path.
      Object getIdentifier()
      Deprecated, for removal: This API element is subject to removal in a future version.
       
      <T extends org.opendaylight.yangtools.yang.binding.DataObject>
      com.google.common.util.concurrent.CheckedFuture<com.google.common.base.Optional<T>,​org.opendaylight.controller.md.sal.common.api.data.ReadFailedException>
      read​(org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType store, org.opendaylight.yangtools.yang.binding.InstanceIdentifier<T> path)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Reads data from the provided logical data store located at the provided path.
      • Methods inherited from class com.google.common.collect.ForwardingObject

        toString
    • Constructor Detail

      • ForwardingReadOnlyTransaction

        protected ForwardingReadOnlyTransaction​(ReadOnlyTransaction delegate)
        Deprecated, for removal: This API element is subject to removal in a future version.
    • Method Detail

      • delegate

        protected ReadTransaction delegate()
        Deprecated, for removal: This API element is subject to removal in a future version.
        Specified by:
        delegate in class com.google.common.collect.ForwardingObject
      • read

        public <T extends org.opendaylight.yangtools.yang.binding.DataObject> com.google.common.util.concurrent.CheckedFuture<com.google.common.base.Optional<T>,​org.opendaylight.controller.md.sal.common.api.data.ReadFailedException> read​(org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType store,
                                                                                                                                                                                                                                                    org.opendaylight.yangtools.yang.binding.InstanceIdentifier<T> path)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Description copied from interface: ReadTransaction
        Reads data from the provided logical data store located at the provided path.

        If the target is a subtree, then the whole subtree is read (and will be accessible from the returned data object).

        Specified by:
        read in interface ReadTransaction
        Parameters:
        store - Logical data store from which read should occur.
        path - Path which uniquely identifies subtree which client want to read
        Returns:
        a CheckFuture containing the result of the read. The Future blocks until the commit operation is complete. Once complete:
        • If the data at the supplied path exists, the Future returns an Optional object containing the data.
        • If the data at the supplied path does not exist, the Future returns Optional#absent().
        • If the read of the data fails, the Future will fail with a ReadFailedException or an exception derived from ReadFailedException.
      • exists

        public com.google.common.util.concurrent.CheckedFuture<Boolean,​org.opendaylight.controller.md.sal.common.api.data.ReadFailedException> exists​(org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType store,
                                                                                                                                                            org.opendaylight.yangtools.yang.binding.InstanceIdentifier<?> path)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Description copied from interface: ReadTransaction
        Checks if data is available in the logical data store located at provided path.

        Note: a successful result from this method makes no guarantee that a subsequent call to ReadTransaction.read(org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType, org.opendaylight.yangtools.yang.binding.InstanceIdentifier<T>) will succeed. It is possible that the data resides in a data store on a remote node and, if that node goes down or a network failure occurs, a subsequent read would fail. Another scenario is if the data is deleted in between the calls to exists and read

        Default implementation delegates to ReadTransaction.read(LogicalDatastoreType, InstanceIdentifier), implementations are advised to provide a more efficient override.

        Specified by:
        exists in interface ReadTransaction
        Parameters:
        store - Logical data store from which read should occur.
        path - Path which uniquely identifies subtree which client want to check existence of
        Returns:
        a CheckFuture containing the result of the check.
        • If the data at the supplied path exists, the Future returns a Boolean whose value is true, false otherwise
        • If checking for the data fails, the Future will fail with a ReadFailedException or an exception derived from ReadFailedException.
      • getIdentifier

        public Object getIdentifier()
        Deprecated, for removal: This API element is subject to removal in a future version.
        Specified by:
        getIdentifier in interface org.opendaylight.controller.md.sal.common.api.data.AsyncTransaction<org.opendaylight.yangtools.yang.binding.InstanceIdentifier<?>,​org.opendaylight.yangtools.yang.binding.DataObject>
        Specified by:
        getIdentifier in interface org.opendaylight.yangtools.concepts.Identifiable<Object>
      • close

        public void close()
        Deprecated, for removal: This API element is subject to removal in a future version.
        Specified by:
        close in interface org.opendaylight.controller.md.sal.common.api.data.AsyncReadOnlyTransaction<org.opendaylight.yangtools.yang.binding.InstanceIdentifier<?>,​org.opendaylight.yangtools.yang.binding.DataObject>
        Specified by:
        close in interface AutoCloseable