org.qi4j.entitystore.riak
Class RiakProtobufMapEntityStoreMixin

java.lang.Object
  extended by org.qi4j.entitystore.riak.RiakProtobufMapEntityStoreMixin
All Implemented Interfaces:
ServiceActivation, RiakAccessors, MapEntityStore

public class RiakProtobufMapEntityStoreMixin
extends java.lang.Object

Riak Protobuf implementation of MapEntityStore.


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.qi4j.api.service.ServiceActivation
ServiceActivation.ServiceActivator
 
Nested classes/interfaces inherited from interface org.qi4j.spi.entitystore.helpers.MapEntityStore
MapEntityStore.JSONKeys, MapEntityStore.MapChanger, MapEntityStore.MapChanges
 
Field Summary
protected  java.lang.String bucketKey
           
protected static int DEFAULT_MAX_CONNECTIONS
           
protected static org.slf4j.Logger LOGGER
           
protected  com.basho.riak.client.IRiakClient riakClient
           
 
Constructor Summary
RiakProtobufMapEntityStoreMixin()
           
 
Method Summary
 void activateService()
          Called after ServiceComposite Activation.
 void applyChanges(MapEntityStore.MapChanges changes)
           
 java.lang.String bucket()
           
 Input<java.io.Reader,java.io.IOException> entityStates()
           
 java.io.Reader get(EntityReference entityReference)
           
 void passivateService()
          Called before ServiceComposite Passivation.
 com.basho.riak.client.IRiakClient riakClient()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOGGER

protected static final org.slf4j.Logger LOGGER

DEFAULT_MAX_CONNECTIONS

protected static final int DEFAULT_MAX_CONNECTIONS
See Also:
Constant Field Values

riakClient

protected com.basho.riak.client.IRiakClient riakClient

bucketKey

protected java.lang.String bucketKey
Constructor Detail

RiakProtobufMapEntityStoreMixin

public RiakProtobufMapEntityStoreMixin()
Method Detail

activateService

public void activateService()
                     throws java.lang.Exception
Description copied from interface: ServiceActivation
Called after ServiceComposite Activation.

Throws:
java.lang.Exception

passivateService

public void passivateService()
                      throws java.lang.Exception
Description copied from interface: ServiceActivation
Called before ServiceComposite Passivation.

Specified by:
passivateService in interface ServiceActivation
Throws:
java.lang.Exception

riakClient

public com.basho.riak.client.IRiakClient riakClient()
Specified by:
riakClient in interface RiakAccessors

bucket

public java.lang.String bucket()
Specified by:
bucket in interface RiakAccessors

get

public java.io.Reader get(EntityReference entityReference)
                   throws EntityStoreException
Specified by:
get in interface MapEntityStore
Returns:
Entity state Reader
Throws:
EntityStoreException

applyChanges

public void applyChanges(MapEntityStore.MapChanges changes)
                  throws java.io.IOException
Specified by:
applyChanges in interface MapEntityStore
Throws:
java.io.IOException

entityStates

public Input<java.io.Reader,java.io.IOException> entityStates()
Specified by:
entityStates in interface MapEntityStore
Returns:
All entities state Readers