Skip to content

Achilles Custom Types

DuyHai DOAN edited this page Aug 7, 2013 · 31 revisions

To support all Cassandra specific but powerfull features such as tunable consistency levels or counters, Achilles introduces custom Java types:


#### ConsistencyLevel It is an enum exposing all existing consistency levels in Cassandra:
  • ANY
  • ONE
  • TWO
  • THREE
  • QUORUM
  • EACH_QUORUM
  • LOCAL_QUORUM
  • ALL

Because Achilles supports both CQL & Thrift implementations, it has to define a custom enum for Consistency instead of re-using the enums provided by Hector or Java Driver Core libraries.

See Consistency Level for more details


#### Counter This type represents a **Cassandra** counter column. It exposes the following methods:
	public Long get();

	public Long get(ConsistencyLevel readLevel);

	public void incr();

	public void incr(ConsistencyLevel writeLevel);

	public void incr(Long increment);

	public void incr(Long increment, ConsistencyLevel writeLevel);

	public void decr();

	public void decr(ConsistencyLevel writeLevel);

	public void decr(Long decrement);

	public void decr(Long decrement, ConsistencyLevel writeLevel);

For more details on counters, see Counter type

Home

Clone this wiki locally