Class CounterMutation

  • All Implemented Interfaces:
    IMutation

    public class CounterMutation
    extends java.lang.Object
    implements IMutation
    • Method Detail

      • getMutation

        public Mutation getMutation()
      • applyCounterMutation

        public Mutation applyCounterMutation()
                                      throws WriteTimeoutException
        Applies the counter mutation, returns the result Mutation (for replication to other nodes). 1. Grabs the striped cell-level locks in the proper order 2. Gets the current values of the counters-to-be-modified from the counter cache 3. Reads the rest of the current values (cache misses) from the CF 4. Writes the updated counter values 5. Updates the counter cache 6. Releases the lock(s) See CASSANDRA-4775 and CASSANDRA-6504 for further details.
        Returns:
        the applied resulting Mutation
        Throws:
        WriteTimeoutException
      • apply

        public void apply()
        Specified by:
        apply in interface IMutation
      • getTimeout

        public long getTimeout​(java.util.concurrent.TimeUnit unit)
        Specified by:
        getTimeout in interface IMutation
      • serializedSize

        public int serializedSize​(int version)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • toString

        public java.lang.String toString​(boolean shallow)
        Specified by:
        toString in interface IMutation