com.hazelcast.collection
Class CollectionService

java.lang.Object
  extended by com.hazelcast.collection.CollectionService
All Implemented Interfaces:
EventPublishingService<CollectionEvent,ItemListener>, ManagedService, MigrationAwareService, RemoteService, TransactionalService
Direct Known Subclasses:
ListService, SetService

public abstract class CollectionService
extends Object
implements ManagedService, RemoteService, EventPublishingService<CollectionEvent,ItemListener>, TransactionalService, MigrationAwareService


Field Summary
protected  NodeEngine nodeEngine
           
 
Constructor Summary
protected CollectionService(NodeEngine nodeEngine)
           
 
Method Summary
 void addContainer(String name, CollectionContainer container)
           
 void beforeMigration(PartitionMigrationEvent event)
           
 void clearPartitionReplica(int partitionId)
           
 void commitMigration(PartitionMigrationEvent event)
           
 void destroyDistributedObject(String name)
           
 void dispatchEvent(CollectionEvent event, ItemListener listener)
           
abstract  Map<String,? extends CollectionContainer> getContainerMap()
           
 Map<String,CollectionContainer> getMigrationData(PartitionReplicationEvent event)
           
abstract  CollectionContainer getOrCreateContainer(String name, boolean backup)
           
abstract  String getServiceName()
           
 void init(NodeEngine nodeEngine, Properties properties)
          Initializes this ManagedService
 void reset()
          reset this ManagedService back to initial state.
 void rollbackMigration(PartitionMigrationEvent event)
           
 void rollbackTransaction(String transactionId)
           
 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
 
Methods inherited from interface com.hazelcast.spi.RemoteService
createDistributedObject
 
Methods inherited from interface com.hazelcast.spi.TransactionalService
createTransactionalObject
 
Methods inherited from interface com.hazelcast.spi.MigrationAwareService
prepareReplicationOperation
 

Field Detail

nodeEngine

protected final NodeEngine nodeEngine
Constructor Detail

CollectionService

protected CollectionService(NodeEngine nodeEngine)
Method Detail

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 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

destroyDistributedObject

public void destroyDistributedObject(String name)
Specified by:
destroyDistributedObject in interface RemoteService

getOrCreateContainer

public abstract CollectionContainer getOrCreateContainer(String name,
                                                         boolean backup)

getContainerMap

public abstract Map<String,? extends CollectionContainer> getContainerMap()

getServiceName

public abstract String getServiceName()

dispatchEvent

public void dispatchEvent(CollectionEvent event,
                          ItemListener listener)
Specified by:
dispatchEvent in interface EventPublishingService<CollectionEvent,ItemListener>

rollbackTransaction

public void rollbackTransaction(String transactionId)
Specified by:
rollbackTransaction in interface TransactionalService

beforeMigration

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

getMigrationData

public Map<String,CollectionContainer> getMigrationData(PartitionReplicationEvent event)

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

addContainer

public void addContainer(String name,
                         CollectionContainer container)


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