Top Level Namespace

Defined Under Namespace

Modules: Cassandra, DataStax

Instance Method Summary collapse

Instance Method Details

#algorithmString

Returns the name of the algorithm this compressor supports, e.g. "snappy" or "lz4".



# File 'lib/cassandra/compression.rb', line 25

#authentication_successful(token) ⇒ void

Note:

This method must absolutely not block.

This method returns an undefined value.

Called when the authentication is successful.



# File 'lib/cassandra/auth.rb', line 88

#challenge_response(token) ⇒ String

Note:

This method must absolutely not block.

If the authentication requires multiple challenge/response cycles this method will be called when a challenge is returned by the server. A response token must be created and will be sent back to the server.



# File 'lib/cassandra/auth.rb', line 77

#compress(frame) ⇒ String

Compresses the raw bytes of a frame.



# File 'lib/cassandra/compression.rb', line 50

#compress?(frame) ⇒ true, false

Before compressing a frame the compressor will be asked if it wants to compress it or not. One reason it could say no is if the frame is small enough that compression would be unlikely to decrease its size.

If your operations consist mostly of small prepared statement executions it might not be useful to compress the frames being sent to Cassandra, but enabling compression can still be useful on the frames coming from Cassandra. Making this method always return false disables request compression, but will still make the client tell Cassandra that it supports compressed frames.

The bytes given to #compress? are the same as to #compress



# File 'lib/cassandra/compression.rb', line 32

#decompress(compressed_frame) ⇒ String

Decompresses the raw bytes of a compressed frame.



# File 'lib/cassandra/compression.rb', line 57

#initial_responseString

Note:

This method must absolutely not block.

This method must return the initial authentication token to be sent to the server.



# File 'lib/cassandra/auth.rb', line 68