get/setTimestamp should support java.time.Instant

Description

And ideally deprecate the java.util.Date versions.

Environment

None

Pull Requests

None

Activity

Show:
Andy Tolbert
August 10, 2017, 12:54 PM

Hi , we plan on making this change in java-driver 4.0 which recently had an alpha release last week. getTimestamp has been replaced with getInstant in java-driver 4.0.

As far as java driver 3.x, we plan on maintaining Java 6 support on that version, but you can use the cassandra-driver-extras module which provides an InstantCodec for working with Instant when dealing with cql timestamp (docs here)

James Howe
August 10, 2017, 1:26 PM
Edited

One problem with that is you get ArithmeticException: long overflow for e.g. Instant.MAX.

Andy Tolbert
February 12, 2018, 6:53 PM

getInstant works for cql timestamp in 4.0.0-alpha1+

Fixed

Assignee

Andy Tolbert

Reporter

James Howe

Labels

None

PM Priority

None

Affects versions

None

Fix versions

Pull Request

None

Doc Impact

None

Size

None

External issue ID

None

External issue ID

None

Components

Priority

Major
Configure