com.hazelcast.collection.impl.queue
public class QueueService extends Object implements ManagedService, MigrationAwareService, TransactionalService, RemoteService, EventPublishingService<QueueEvent,ItemListener>, StatisticsAwareService
QueueEvictionProcessor
Modifier and Type | Field and Description |
---|---|
static String |
SERVICE_NAME
Service name.
|
Constructor and Description |
---|
QueueService(NodeEngine nodeEngine) |
public static final String SERVICE_NAME
public QueueService(NodeEngine nodeEngine)
public void scheduleEviction(String name, long delay)
public void cancelEviction(String name)
public void init(NodeEngine nodeEngine, Properties properties)
ManagedService
init
in interface ManagedService
nodeEngine
- the NodeEngine that 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
terminate
- true to shut down the ManagedServicepublic QueueContainer getOrCreateContainer(String name, boolean fromBackup) throws Exception
Exception
public void addContainer(String name, QueueContainer container)
public boolean containsQueue(String name)
public void beforeMigration(PartitionMigrationEvent partitionMigrationEvent)
beforeMigration
in interface MigrationAwareService
public Operation prepareReplicationOperation(PartitionReplicationEvent event)
prepareReplicationOperation
in interface MigrationAwareService
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 dispatchEvent(QueueEvent event, ItemListener listener)
dispatchEvent
in interface EventPublishingService<QueueEvent,ItemListener>
public QueueProxyImpl createDistributedObject(String objectId)
RemoteService
createDistributedObject
in interface RemoteService
objectId
- the name for the created distributed objectpublic void destroyDistributedObject(String name)
RemoteService
destroyDistributedObject
in interface RemoteService
name
- the name of the distributed object to destroypublic String addItemListener(String name, ItemListener listener, boolean includeValue)
public NodeEngine getNodeEngine()
public LocalQueueStats createLocalQueueStats(String name, int partitionId)
public LocalQueueStats createLocalQueueStats(String name)
public LocalQueueStatsImpl getLocalQueueStatsImpl(String name)
public TransactionalQueueProxy createTransactionalObject(String name, TransactionSupport transaction)
createTransactionalObject
in interface TransactionalService
public void rollbackTransaction(String transactionId)
rollbackTransaction
in interface TransactionalService
public Map<String,LocalQueueStats> getStats()
getStats
in interface StatisticsAwareService
Copyright © 2015 Hazelcast, Inc.. All Rights Reserved.