TimestampSerializer (apache-cassandra API)
Date: 2018-02-14

org.apache.cassandra.serializers

## Class TimestampSerializer

- java.lang.Object
- - org.apache.cassandra.serializers.TimestampSerializer

- All Implemented Interfaces:
    TypeSerializer<java.util.Date>

      public class TimestampSerializer
      extends java.lang.Object
      implements TypeSerializer<java.util.Date>

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static TimestampSerializer` | `instance`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `TimestampSerializer()`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static long` | `dateStringToTimestamp(java.lang.String source)`
    `java.util.Date` | `deserialize(java.nio.ByteBuffer bytes)`
    `static java.text.SimpleDateFormat` | `getJsonDateFormatter()`
    `java.lang.Class<java.util.Date>` | `getType()`
    `java.nio.ByteBuffer` | `serialize(java.util.Date value)`
    `java.lang.String` | `toCQLLiteral(java.nio.ByteBuffer buffer)` Builds CQL literal for a timestamp using time zone UTC and fixed date format.
    `java.lang.String` | `toString(java.util.Date value)`
    `java.lang.String` | `toStringUTC(java.util.Date value)`
    `void` | `validate(java.nio.ByteBuffer bytes)`

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

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

- - ### Field Detail

    - #### instance

          public static final TimestampSerializer instance

  - ### Constructor Detail

    - #### TimestampSerializer

          public TimestampSerializer()

  - ### Method Detail

    - #### deserialize

          public java.util.Date deserialize(java.nio.ByteBuffer bytes)

      Specified by:
        `deserialize` in interface `TypeSerializer<java.util.Date>`

    - #### serialize

          public java.nio.ByteBuffer serialize(java.util.Date value)

      Specified by:
        `serialize` in interface `TypeSerializer<java.util.Date>`

    - #### dateStringToTimestamp

          public static long dateStringToTimestamp(java.lang.String source)
                                            throws MarshalException

      Throws:
        `MarshalException`

    - #### getJsonDateFormatter

          public static java.text.SimpleDateFormat getJsonDateFormatter()

    - #### validate

          public void validate(java.nio.ByteBuffer bytes)
                        throws MarshalException

      Specified by:
        `validate` in interface `TypeSerializer<java.util.Date>`
      Throws:
        `MarshalException`

    - #### toString

          public java.lang.String toString(java.util.Date value)

      Specified by:
        `toString` in interface `TypeSerializer<java.util.Date>`

    - #### toStringUTC

          public java.lang.String toStringUTC(java.util.Date value)

    - #### getType

          public java.lang.Class<java.util.Date> getType()

      Specified by:
        `getType` in interface `TypeSerializer<java.util.Date>`

    - #### toCQLLiteral

          public java.lang.String toCQLLiteral(java.nio.ByteBuffer buffer)

      Builds CQL literal for a timestamp using time zone UTC and fixed date format.
      Specified by:
        `toCQLLiteral` in interface `TypeSerializer<java.util.Date>`
      See Also:
        `FORMATTER_UTC`

Copyright © 2018 The Apache Software Foundation