riak-1.2.0.0: A Haskell client for the Riak decentralized data store
Copyright(c) 2011 MailRank Inc.
LicenseApache
MaintainerMark Hibberd <mark@hibberd.id.au>, Nathan Hunter <nhunter@janrain.com>
Stabilityexperimental
Portabilityportable
Safe HaskellNone
LanguageHaskell2010

Network.Riak.Types

Description

Basic types.

Synopsis

Client management

type ClientID = ByteString Source #

A client identifier. This is used by the Riak cluster when logging vector clock changes, and should be unique for each client.

data Client Source #

Constructors

Client 

Fields

Instances

Instances details
Eq Client Source # 
Instance details

Defined in Network.Riak.Types.Internal

Methods

(==) :: Client -> Client -> Bool #

(/=) :: Client -> Client -> Bool #

Show Client Source # 
Instance details

Defined in Network.Riak.Types.Internal

Connection management

data Connection Source #

A connection to a Riak server.

Instances

Instances details
Eq Connection Source # 
Instance details

Defined in Network.Riak.Types.Internal

Show Connection Source # 
Instance details

Defined in Network.Riak.Types.Internal

Errors

Data types

type BucketType = ByteString Source #

Bucket types is a riak >= 2.0 feature allowing groups of buckets to share configuration details

type Bucket = ByteString Source #

A Bucket is a container and keyspace for data stored in Riak, with a set of common properties for its contents (the number of replicas, for instance).

type Key = ByteString Source #

Keys are unique object identifiers in Riak and are scoped within buckets.

type Tag = ByteString Source #

An application-specific identifier for a link. See http://wiki.basho.com/Links.html for details.

newtype VClock Source #

A wrapper that keeps Riak vector clocks opaque.

Constructors

VClock 

Fields

Instances

Instances details
Eq VClock Source # 
Instance details

Defined in Network.Riak.Types.Internal

Methods

(==) :: VClock -> VClock -> Bool #

(/=) :: VClock -> VClock -> Bool #

Show VClock Source # 
Instance details

Defined in Network.Riak.Types.Internal

data Job Source #

A specification of a MapReduce job. http://wiki.basho.com/MapReduce.html.

Instances

Instances details
Eq Job Source # 
Instance details

Defined in Network.Riak.Types.Internal

Methods

(==) :: Job -> Job -> Bool #

(/=) :: Job -> Job -> Bool #

Show Job Source # 
Instance details

Defined in Network.Riak.Types.Internal

Methods

showsPrec :: Int -> Job -> ShowS #

show :: Job -> String #

showList :: [Job] -> ShowS #

Quorum management

data Quorum Source #

A read/write quorum. The quantity of replicas that must respond to a read or write request before it is considered successful. This is defined as a bucket property or as one of the relevant parameters to a single request (R,W,DW,RW).

Constructors

Default

Use the default quorum settings for the bucket.

One

Success after one server has responded.

Quorum

Success after a quorum of servers has responded.

All

Success after all servers have responded.

Instances

Instances details
Bounded Quorum Source # 
Instance details

Defined in Network.Riak.Types.Internal

Enum Quorum Source # 
Instance details

Defined in Network.Riak.Types.Internal

Eq Quorum Source # 
Instance details

Defined in Network.Riak.Types.Internal

Methods

(==) :: Quorum -> Quorum -> Bool #

(/=) :: Quorum -> Quorum -> Bool #

Ord Quorum Source # 
Instance details

Defined in Network.Riak.Types.Internal

Show Quorum Source # 
Instance details

Defined in Network.Riak.Types.Internal

type RW = Quorum Source #

Read/write quorum. How many replicas need to collaborate when deleting a value.

type R = Quorum Source #

Read quorum. How many replicas need to agree when retrieving a value.

type W = Quorum Source #

Write quorum. How many replicas to write to before returning a successful response.

type DW = Quorum Source #

Durable write quorum. How many replicas to commit to durable storage before returning a successful response.

Message identification

class (Message msg, Show msg, Tagged msg) => Request msg Source #

A message representing a request from client to server.

Minimal complete definition

expectedResponse

Instances

Instances details
Request DtFetchReq Source # 
Instance details

Defined in Network.Riak.Tag

Request DtUpdateReq Source # 
Instance details

Defined in Network.Riak.Tag

Request RpbDelReq Source # 
Instance details

Defined in Network.Riak.Tag

Request RpbGetBucketReq Source # 
Instance details

Defined in Network.Riak.Tag

Request RpbGetBucketTypeReq Source # 
Instance details

Defined in Network.Riak.Tag

Request RpbGetClientIdReq Source # 
Instance details

Defined in Network.Riak.Tag

Request RpbGetReq Source # 
Instance details

Defined in Network.Riak.Tag

Request RpbGetServerInfoReq Source # 
Instance details

Defined in Network.Riak.Tag

Request RpbIndexReq Source # 
Instance details

Defined in Network.Riak.Tag

Request RpbListBucketsReq Source # 
Instance details

Defined in Network.Riak.Tag

Request RpbListKeysReq Source # 
Instance details

Defined in Network.Riak.Tag

Request RpbMapRedReq Source # 
Instance details

Defined in Network.Riak.Tag

Request RpbPingReq Source # 
Instance details

Defined in Network.Riak.Tag

Request RpbPutReq Source # 
Instance details

Defined in Network.Riak.Tag

Request RpbSearchQueryReq Source # 
Instance details

Defined in Network.Riak.Tag

Request RpbSetBucketReq Source # 
Instance details

Defined in Network.Riak.Tag

Request RpbSetClientIdReq Source # 
Instance details

Defined in Network.Riak.Tag

Request RpbYokozunaIndexDeleteReq Source # 
Instance details

Defined in Network.Riak.Tag

Request RpbYokozunaIndexGetReq Source # 
Instance details

Defined in Network.Riak.Tag

Request RpbYokozunaIndexPutReq Source # 
Instance details

Defined in Network.Riak.Tag

class (Message msg, Show msg, Tagged msg) => Response msg Source #

A message representing a response from server to client.

Instances

Instances details
Response DtFetchResp Source # 
Instance details

Defined in Network.Riak.Tag

Response DtUpdateResp Source # 
Instance details

Defined in Network.Riak.Tag

Response RpbErrorResp Source # 
Instance details

Defined in Network.Riak.Tag

Response RpbGetBucketResp Source # 
Instance details

Defined in Network.Riak.Tag

Response RpbGetClientIdResp Source # 
Instance details

Defined in Network.Riak.Tag

Response RpbGetResp Source # 
Instance details

Defined in Network.Riak.Tag

Response RpbGetServerInfoResp Source # 
Instance details

Defined in Network.Riak.Tag

Response RpbIndexResp Source # 
Instance details

Defined in Network.Riak.Tag

Response RpbListBucketsResp Source # 
Instance details

Defined in Network.Riak.Tag

Response RpbListKeysResp Source # 
Instance details

Defined in Network.Riak.Tag

Response RpbMapRedResp Source # 
Instance details

Defined in Network.Riak.Tag

Response RpbPutResp Source # 
Instance details

Defined in Network.Riak.Tag

Response RpbSearchQueryResp Source # 
Instance details

Defined in Network.Riak.Tag

Response RpbYokozunaIndexGetResp Source # 
Instance details

Defined in Network.Riak.Tag

data MessageTag Source #

List of (known to us) inbound or outbound message identifiers.

Instances

Instances details
Eq MessageTag Source # 
Instance details

Defined in Network.Riak.Types.Internal

Show MessageTag Source # 
Instance details

Defined in Network.Riak.Types.Internal

Generic MessageTag Source # 
Instance details

Defined in Network.Riak.Types.Internal

Associated Types

type Rep MessageTag :: Type -> Type #

Hashable MessageTag Source # 
Instance details

Defined in Network.Riak.Types.Internal

Tagged MessageTag Source # 
Instance details

Defined in Network.Riak.Types.Internal

type Rep MessageTag Source # 
Instance details

Defined in Network.Riak.Types.Internal

type Rep MessageTag = D1 ('MetaData "MessageTag" "Network.Riak.Types.Internal" "riak-1.2.0.0-CYLrRp5TJSeH9YOHpDuG7W" 'False) (((((C1 ('MetaCons "ErrorResponse" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "PingRequest" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "PingResponse" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "GetClientIDRequest" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "GetClientIDResponse" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "SetClientIDRequest" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "SetClientIDResponse" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "GetServerInfoRequest" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "GetServerInfoResponse" 'PrefixI 'False) (U1 :: Type -> Type))))) :+: (((C1 ('MetaCons "GetRequest" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "GetResponse" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "PutRequest" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "PutResponse" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "DeleteRequest" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "DeleteResponse" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ListBucketsRequest" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "ListBucketsResponse" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "ListKeysRequest" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ListKeysResponse" 'PrefixI 'False) (U1 :: Type -> Type)))))) :+: ((((C1 ('MetaCons "GetBucketRequest" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "GetBucketResponse" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "SetBucketRequest" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "SetBucketResponse" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "GetBucketTypeRequest" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "MapReduceRequest" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "MapReduceResponse" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "IndexRequest" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "IndexResponse" 'PrefixI 'False) (U1 :: Type -> Type))))) :+: (((C1 ('MetaCons "DtFetchRequest" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "DtFetchResponse" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "DtUpdateRequest" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "DtUpdateResponse" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "SearchQueryRequest" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "SearchQueryResponse" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "YokozunaIndexGetRequest" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "YokozunaIndexGetResponse" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "YokozunaIndexPutRequest" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "YokozunaIndexDeleteRequest" 'PrefixI 'False) (U1 :: Type -> Type)))))))

class Tagged msg where Source #

Messages are tagged.

Methods

messageTag Source #

Arguments

:: msg 
-> MessageTag

Retrieve a message's tag.

Instances

Instances details
Tagged DtFetchReq Source # 
Instance details

Defined in Network.Riak.Tag

Tagged DtFetchResp Source # 
Instance details

Defined in Network.Riak.Tag

Tagged DtUpdateReq Source # 
Instance details

Defined in Network.Riak.Tag

Tagged DtUpdateResp Source # 
Instance details

Defined in Network.Riak.Tag

Tagged RpbDelReq Source # 
Instance details

Defined in Network.Riak.Tag

Tagged RpbErrorResp Source # 
Instance details

Defined in Network.Riak.Tag

Tagged RpbGetBucketReq Source # 
Instance details

Defined in Network.Riak.Tag

Tagged RpbGetBucketResp Source # 
Instance details

Defined in Network.Riak.Tag

Tagged RpbGetBucketTypeReq Source # 
Instance details

Defined in Network.Riak.Tag

Tagged RpbGetClientIdReq Source # 
Instance details

Defined in Network.Riak.Tag

Tagged RpbGetClientIdResp Source # 
Instance details

Defined in Network.Riak.Tag

Tagged RpbGetReq Source # 
Instance details

Defined in Network.Riak.Tag

Tagged RpbGetResp Source # 
Instance details

Defined in Network.Riak.Tag

Tagged RpbGetServerInfoReq Source # 
Instance details

Defined in Network.Riak.Tag

Tagged RpbGetServerInfoResp Source # 
Instance details

Defined in Network.Riak.Tag

Tagged RpbIndexReq Source # 
Instance details

Defined in Network.Riak.Tag

Tagged RpbIndexResp Source # 
Instance details

Defined in Network.Riak.Tag

Tagged RpbListBucketsReq Source # 
Instance details

Defined in Network.Riak.Tag

Tagged RpbListBucketsResp Source # 
Instance details

Defined in Network.Riak.Tag

Tagged RpbListKeysReq Source # 
Instance details

Defined in Network.Riak.Tag

Tagged RpbListKeysResp Source # 
Instance details

Defined in Network.Riak.Tag

Tagged RpbMapRedReq Source # 
Instance details

Defined in Network.Riak.Tag

Tagged RpbMapRedResp Source # 
Instance details

Defined in Network.Riak.Tag

Tagged RpbPingReq Source # 
Instance details

Defined in Network.Riak.Tag

Tagged RpbPutReq Source # 
Instance details

Defined in Network.Riak.Tag

Tagged RpbPutResp Source # 
Instance details

Defined in Network.Riak.Tag

Tagged RpbSearchQueryReq Source # 
Instance details

Defined in Network.Riak.Tag

Tagged RpbSearchQueryResp Source # 
Instance details

Defined in Network.Riak.Tag

Tagged RpbSetBucketReq Source # 
Instance details

Defined in Network.Riak.Tag

Tagged RpbSetClientIdReq Source # 
Instance details

Defined in Network.Riak.Tag

Tagged RpbYokozunaIndexDeleteReq Source # 
Instance details

Defined in Network.Riak.Tag

Tagged RpbYokozunaIndexGetReq Source # 
Instance details

Defined in Network.Riak.Tag

Tagged RpbYokozunaIndexGetResp Source # 
Instance details

Defined in Network.Riak.Tag

Tagged RpbYokozunaIndexPutReq Source # 
Instance details

Defined in Network.Riak.Tag

Tagged MessageTag Source # 
Instance details

Defined in Network.Riak.Types.Internal

data IndexValue Source #

Instances

Instances details
Eq IndexValue Source # 
Instance details

Defined in Network.Riak.Types.Internal

Show IndexValue Source # 
Instance details

Defined in Network.Riak.Types.Internal

data IndexQuery Source #

Index query. Can be exact or range, int or bin. Index name should not contain the "_bin" or "_int" part, since it's determined from data constructor.

Instances

Instances details
Eq IndexQuery Source # 
Instance details

Defined in Network.Riak.Types.Internal

Show IndexQuery Source # 
Instance details

Defined in Network.Riak.Types.Internal