org.modeshape.jcr.value.binary.infinispan

## Class Metadata

- java.lang.Object
- - org.modeshape.jcr.value.binary.infinispan.Metadata

- All Implemented Interfaces:
    Externalizable, Serializable

      public final class Metadata
      extends Object
      implements Externalizable

  Class which holds various information about the binary data that is stored in ISPN.
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `` | `Metadata()` Public no-arg ctr, required by serialization
    `protected` | `Metadata(long modificationTime, long length, int numberOfChunks, int chunkSize)`
    `protected` | `Metadata(long modificationTime, long length, int numberOfChunks, long unusedSince, String mimeType, int numberTextChunks, int chunkSize)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected int` | `getChunkSize()`
    `protected long` | `getLength()`
    `protected String` | `getMimeType()`
    `protected int` | `getNumberChunks()`
    `protected int` | `getNumberTextChunks()`
    `protected boolean` | `isUnused()`
    `protected void` | `markAsUnusedSince(long unusedSince)`
    `protected void` | `markAsUsed()`
    `void` | `readExternal(ObjectInput in)`
    `protected long` | `unusedSince()`
    `protected Metadata` | `withMimeType(String mimeType)`
    `protected Metadata` | `withNumberOfTextChunks(int numberTextChunks)`
    `void` | `writeExternal(ObjectOutput out)`

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

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### Metadata

          public Metadata()

      Public no-arg ctr, required by serialization

    - #### Metadata

          protected Metadata(long modificationTime,
                  long length,
                  int numberOfChunks,
                  int chunkSize)

    - #### Metadata

          protected Metadata(long modificationTime,
                  long length,
                  int numberOfChunks,
                  long unusedSince,
                  String mimeType,
                  int numberTextChunks,
                  int chunkSize)

  - ### Method Detail

    - #### getLength

          protected long getLength()

    - #### getMimeType

          protected String getMimeType()

    - #### withMimeType

          protected Metadata withMimeType(String mimeType)

    - #### getNumberTextChunks

          protected int getNumberTextChunks()

    - #### withNumberOfTextChunks

          protected Metadata withNumberOfTextChunks(int numberTextChunks)

    - #### getNumberChunks

          protected int getNumberChunks()

    - #### isUnused

          protected boolean isUnused()

    - #### markAsUnusedSince

          protected void markAsUnusedSince(long unusedSince)

    - #### markAsUsed

          protected void markAsUsed()

    - #### getChunkSize

          protected int getChunkSize()

    - #### unusedSince

          protected long unusedSince()

      Returns:
        unused time in MS or 0 if still in use

    - #### writeExternal

          public void writeExternal(ObjectOutput out)
                             throws IOException

      Specified by:
        `writeExternal` in interface `Externalizable`
      Throws:
        `IOException`

    - #### readExternal

          public void readExternal(ObjectInput in)
                            throws IOException

      Specified by:
        `readExternal` in interface `Externalizable`
      Throws:
        `IOException`

Copyright © 2008-2014 JBoss, a division of Red Hat. All Rights Reserved.