Package com.hazelcast.partition

Examples of com.hazelcast.partition.InternalPartition


        final MapServiceContext mapServiceContext = mapService.getMapServiceContext();
        final NodeEngine nodeEngine = mapServiceContext.getNodeEngine();
        final InternalPartitionService partitionService = nodeEngine.getPartitionService();
        final Address thisAddress = nodeEngine.getThisAddress();
        final int partitionId = partitionService.getPartitionId(key);
        final InternalPartition partition = partitionService.getPartition(partitionId, false);
        if (!partition.isOwnerOrBackup(thisAddress)) {
            return null;
        }
        final PartitionContainer partitionContainer = mapServiceContext.getPartitionContainer(partitionId);
        final RecordStore recordStore = partitionContainer.getExistingRecordStore(name);
        if (recordStore == null) {
View Full Code Here


    @Override
    public boolean shouldBackup() {
        final NodeEngine nodeEngine = getNodeEngine();
        InternalPartitionService partitionService = nodeEngine.getPartitionService();
        InternalPartition partition = partitionService.getPartition(getPartitionId());
        return nodeEngine.getThisAddress().equals(partition.getOwnerOrNull())
                && Boolean.TRUE.equals(response);
    }
View Full Code Here

TOP

Related Classes of com.hazelcast.partition.InternalPartition

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.