com.hazelcast.ringbuffer.impl
Class RingbufferService

java.lang.Object
  extended by com.hazelcast.ringbuffer.impl.RingbufferService
All Implemented Interfaces:
ManagedService, MigrationAwareService, RemoteService

public class RingbufferService
extends Object
implements ManagedService, RemoteService, MigrationAwareService

The SPI Service that deals with the Ringbuffer.


Field Summary
static String SERVICE_NAME
          The name of the RingbufferService.
static String TOPIC_RB_PREFIX
          Prefix of ringbuffers that are created for topics.
 
Constructor Summary
RingbufferService(NodeEngineImpl nodeEngine)
           
 
Method Summary
 void addRingbuffer(String name, RingbufferContainer ringbuffer)
           
 void beforeMigration(PartitionMigrationEvent partitionMigrationEvent)
           
 void clearPartitionReplica(int partitionId)
           
 void commitMigration(PartitionMigrationEvent event)
           
 DistributedObject createDistributedObject(String objectName)
          Creates a distributed object.
 void destroyDistributedObject(String name)
          Destroys a distributed object.
 RingbufferContainer getContainer(String name)
           
 ConcurrentMap<String,RingbufferContainer> getContainers()
           
 void init(NodeEngine nodeEngine, Properties properties)
          Initializes this ManagedService
 Operation prepareReplicationOperation(PartitionReplicationEvent event)
           
 void reset()
          reset this ManagedService back to initial state.
 void rollbackMigration(PartitionMigrationEvent event)
           
 void shutdown(boolean terminate)
          Shuts down this ManagedService.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TOPIC_RB_PREFIX

public static final String TOPIC_RB_PREFIX
Prefix of ringbuffers that are created for topics. Using a prefix prevents users accidentally retrieving the ringbuffer.

See Also:
Constant Field Values

SERVICE_NAME

public static final String SERVICE_NAME
The name of the RingbufferService.

See Also:
Constant Field Values
Constructor Detail

RingbufferService

public RingbufferService(NodeEngineImpl nodeEngine)
Method Detail

getContainers

public ConcurrentMap<String,RingbufferContainer> getContainers()

createDistributedObject

public DistributedObject createDistributedObject(String objectName)
Description copied from interface: RemoteService
Creates a distributed object.

Specified by:
createDistributedObject in interface RemoteService
Parameters:
objectName - the name for the created distributed object
Returns:
the created distributed object

destroyDistributedObject

public void destroyDistributedObject(String name)
Description copied from interface: RemoteService
Destroys a distributed object.

Specified by:
destroyDistributedObject in interface RemoteService
Parameters:
name - the name of the distributed object to destroy

init

public void init(NodeEngine nodeEngine,
                 Properties properties)
Description copied from interface: ManagedService
Initializes this ManagedService

Specified by:
init in interface ManagedService
Parameters:
nodeEngine - the NodeEngine that this ManagedService belongs to.
properties - the Properties. Can be used to pass settings to the service.

reset

public void reset()
Description copied from interface: ManagedService
reset this ManagedService back to initial state. todo: what is the purpose of reset

Specified by:
reset in interface ManagedService

shutdown

public void shutdown(boolean terminate)
Description copied from interface: ManagedService
Shuts down this ManagedService. todo: what is the purpose of the terminate variable.

Specified by:
shutdown in interface ManagedService
Parameters:
terminate - true to shut down the ManagedService

beforeMigration

public void beforeMigration(PartitionMigrationEvent partitionMigrationEvent)
Specified by:
beforeMigration in interface MigrationAwareService

prepareReplicationOperation

public Operation prepareReplicationOperation(PartitionReplicationEvent event)
Specified by:
prepareReplicationOperation in interface MigrationAwareService

commitMigration

public void commitMigration(PartitionMigrationEvent event)
Specified by:
commitMigration in interface MigrationAwareService

rollbackMigration

public void rollbackMigration(PartitionMigrationEvent event)
Specified by:
rollbackMigration in interface MigrationAwareService

clearPartitionReplica

public void clearPartitionReplica(int partitionId)
Specified by:
clearPartitionReplica in interface MigrationAwareService

getContainer

public RingbufferContainer getContainer(String name)

addRingbuffer

public void addRingbuffer(String name,
                          RingbufferContainer ringbuffer)


Copyright © 2015 Hazelcast, Inc.. All Rights Reserved.