AnyEvent-RipeRedis

 view release on metacpan or  search on metacpan

README.md  view on Meta::CPAN

- E\_OOM

    Command not allowed when used memory > 'maxmemory'.

- E\_EXEC\_ABORT

    Transaction discarded because of previous errors.

Error codes available since Redis 2.8.

- E\_NO\_AUTH

    Authentication required.

- E\_WRONG\_TYPE

    Operation against a key holding the wrong kind of value.

- E\_NO\_REPLICAS

    Not enough good slaves to write.

- E\_BUSY\_KEY

    Target key name already exists.

Error codes available since Redis 3.0.

- E\_CROSS\_SLOT

    Keys in request don't hash to the same slot.

- E\_TRY\_AGAIN

    Multiple keys request during rehashing of slot.

- E\_ASK

    Redirection required. For more information see:
    [http://redis.io/topics/cluster-spec](http://redis.io/topics/cluster-spec)

- E\_MOVED

    Redirection required. For more information see:
    [http://redis.io/topics/cluster-spec](http://redis.io/topics/cluster-spec)

- E\_CLUSTER\_DOWN

    The cluster is down or hash slot not served.

# DISCONNECTION

When the connection to the server is no longer needed you can close it in three
ways: call the method `disconnect()`, send the `QUIT` command or you can just
"forget" any references to an AnyEvent::RipeRedis object, but in this
case the client object is destroyed without calling any callbacks, including
the `on_disconnect` callback, to avoid an unexpected behavior.

## disconnect()

The method for synchronous disconnection. All uncompleted operations will be
aborted.

## quit( \[ $cb->( $reply, $err ) \] )

The method for asynchronous disconnection.

# OTHER METHODS

## info( \[ $section \] \[, $cb->( $reply, $err ) \] )

Gets and parses information and statistics about the server. The result
is passed to callback as a hash reference.

More information about `INFO` command can be found here:
[http://redis.io/commands/info](http://redis.io/commands/info)

## host()

Gets current host of the client.

## port()

Gets current port of the client.

## select( $index, \[, $cb->( $reply, $err ) \] )

Selects the database by numeric index.

## database()

Gets selected database index.

## utf8( \[ $boolean \] )

Enables or disables UTF-8 mode.

## connection\_timeout( \[ $fractional\_seconds \] )

Gets or sets the `connection_timeout` of the client. The `undef` value resets
the `connection_timeout` to default value.

## read\_timeout( \[ $fractional\_seconds \] )

Gets or sets the `read_timeout` of the client.

## reconnect( \[ $boolean \] )

Enables or disables reconnection mode of the client.

## reconnect\_interval( \[ $fractional\_seconds \] )

Gets or sets `reconnect_interval` of the client.

## on\_connect( \[ $callback \] )

Gets or sets the `on_connect` callback.

## on\_disconnect( \[ $callback \] )

Gets or sets the `on_disconnect` callback.

## on\_error( \[ $callback \] )

Gets or sets the `on_error` callback.



( run in 0.954 second using v1.01-cache-2.11-cpan-524268b4103 )