public abstract class CollectionService extends Object implements ManagedService, RemoteService, EventPublishingService<CollectionEvent,ItemListener>, TransactionalService, MigrationAwareService
Modifier and Type | Field and Description |
---|---|
protected NodeEngine |
nodeEngine |
Modifier | Constructor and Description |
---|---|
protected |
CollectionService(NodeEngine nodeEngine) |
Modifier and Type | Method and Description |
---|---|
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.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
createDistributedObject
createTransactionalObject
prepareReplicationOperation
protected final NodeEngine nodeEngine
protected CollectionService(NodeEngine nodeEngine)
public void init(NodeEngine nodeEngine, Properties properties)
ManagedService
init
in interface ManagedService
nodeEngine
- the NodeEngine this ManagedService belongs to.properties
- the Properties. Can be used to pass settings to the service.public void reset()
ManagedService
reset
in interface ManagedService
public void shutdown(boolean terminate)
ManagedService
shutdown
in interface ManagedService
public void destroyDistributedObject(String name)
destroyDistributedObject
in interface RemoteService
public abstract CollectionContainer getOrCreateContainer(String name, boolean backup)
public abstract Map<String,? extends CollectionContainer> getContainerMap()
public abstract String getServiceName()
public void dispatchEvent(CollectionEvent event, ItemListener listener)
dispatchEvent
in interface EventPublishingService<CollectionEvent,ItemListener>
public void rollbackTransaction(String transactionId)
rollbackTransaction
in interface TransactionalService
public void beforeMigration(PartitionMigrationEvent event)
beforeMigration
in interface MigrationAwareService
public Map<String,CollectionContainer> getMigrationData(PartitionReplicationEvent event)
public void commitMigration(PartitionMigrationEvent event)
commitMigration
in interface MigrationAwareService
public void rollbackMigration(PartitionMigrationEvent event)
rollbackMigration
in interface MigrationAwareService
public void clearPartitionReplica(int partitionId)
clearPartitionReplica
in interface MigrationAwareService
public void addContainer(String name, CollectionContainer container)
Copyright © 2014 Hazelcast, Inc.. All Rights Reserved.