com.hazelcast.spi

## Class DistributedObjectNamespace

- java.lang.Object
- - com.hazelcast.spi.DefaultObjectNamespace
  - - com.hazelcast.spi.DistributedObjectNamespace

- All Implemented Interfaces:
    DataSerializable, IdentifiedDataSerializable, ObjectNamespace, ServiceNamespace

      public final class DistributedObjectNamespace
      extends DefaultObjectNamespace
      implements ObjectNamespace, IdentifiedDataSerializable

  Default `ObjectNamespace` implementation for `DistributedObject`.
  Since:
    3.9

- - ### Field Summary

    - ### Fields inherited from class com.hazelcast.spi.DefaultObjectNamespace

      `objectName, service`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DistributedObjectNamespace()`
    `DistributedObjectNamespace(ObjectNamespace namespace)`
    `DistributedObjectNamespace(String serviceName, String objectName)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `getFactoryId()` Returns DataSerializableFactory factory ID for this class.
    `int` | `getId()` Returns type identifier for this class.
    `void` | `readData(ObjectDataInput in)` Reads fields from the input stream
    `void` | `writeData(ObjectDataOutput out)` Writes object fields to output stream

    - ### Methods inherited from class com.hazelcast.spi.DefaultObjectNamespace

      `equals, getObjectName, getServiceName, hashCode, toString`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface com.hazelcast.spi.ObjectNamespace

      `getObjectName`

    - ### Methods inherited from interface com.hazelcast.spi.ServiceNamespace

      `getServiceName`

- - ### Constructor Detail

    - #### DistributedObjectNamespace

          public DistributedObjectNamespace()

    - #### DistributedObjectNamespace

          public DistributedObjectNamespace(String serviceName,
                                            String objectName)

    - #### DistributedObjectNamespace

          public DistributedObjectNamespace(ObjectNamespace namespace)

  - ### Method Detail

    - #### writeData

          public void writeData(ObjectDataOutput out)
                         throws IOException

      Description copied from interface: `DataSerializable`
      Writes object fields to output stream
      Specified by:
        `writeData` in interface `DataSerializable`
      Overrides:
        `writeData` in class `DefaultObjectNamespace`
      Parameters:
        `out` - output
      Throws:
        `IOException` - if an I/O error occurs. In particular, an `IOException` may be thrown if the output stream has been closed.

    - #### readData

          public void readData(ObjectDataInput in)
                        throws IOException

      Description copied from interface: `DataSerializable`
      Reads fields from the input stream
      Specified by:
        `readData` in interface `DataSerializable`
      Overrides:
        `readData` in class `DefaultObjectNamespace`
      Parameters:
        `in` - input
      Throws:
        `IOException` - if an I/O error occurs. In particular, an `IOException` may be thrown if the input stream has been closed.

    - #### getFactoryId

          public int getFactoryId()

      Description copied from interface: `IdentifiedDataSerializable`
      Returns DataSerializableFactory factory ID for this class.
      Specified by:
        `getFactoryId` in interface `IdentifiedDataSerializable`
      Returns:
        factory ID

    - #### getId

          public int getId()

      Description copied from interface: `IdentifiedDataSerializable`
      Returns type identifier for this class. It should be unique per DataSerializableFactory.
      Specified by:
        `getId` in interface `IdentifiedDataSerializable`
      Returns:
        type ID

Copyright © 2019. All rights reserved.