Package com.hazelcast.map.impl

Examples of com.hazelcast.map.impl.RecordStore


    public void run() throws Exception {

        // TODO this also clears locked keys from near cache which should be preserved.
        mapService.getMapServiceContext().getNearCacheProvider().clearNearCache(name);

        final RecordStore recordStore = mapService.getMapServiceContext().getExistingRecordStore(getPartitionId(), name);
        if (recordStore == null) {
            return;
        }
        numberOfEvictedEntries = recordStore.evictAll(false);
        shouldRunOnBackup = true;
    }
View Full Code Here


    public MapKeySetOperation() {
    }

    public void run() {
        MapService mapService = getService();
        RecordStore recordStore = mapService.getMapServiceContext().getRecordStore(getPartitionId(), name);
        keySet = recordStore.keySet();
        if (mapContainer.getMapConfig().isStatisticsEnabled()) {
            ((MapService) getService()).getMapServiceContext()
                    .getLocalMapStatsProvider().getLocalMapStatsImpl(name).incrementOtherOperations();
        }
    }
View Full Code Here

    public MapIsEmptyOperation() {
    }

    public void run() {
        final MapServiceContext mapServiceContext = mapService.getMapServiceContext();
        RecordStore recordStore = mapServiceContext.getRecordStore(getPartitionId(), name);
        empty = recordStore.isEmpty();
        if (mapContainer.getMapConfig().isStatisticsEnabled()) {
            mapServiceContext.getLocalMapStatsProvider()
                    .getLocalMapStatsImpl(name).incrementOtherOperations();
        }
    }
View Full Code Here

    public GetEntryViewOperation() {
    }

    public void run() {
        MapService mapService = getService();
        RecordStore recordStore = mapService.getMapServiceContext().getRecordStore(getPartitionId(), name);
        Record record = recordStore.getRecordOrNull(dataKey);
        if (record != null) {
            result = EntryViews.createSimpleEntryView(record.getKey(),
                    mapService.getMapServiceContext().toData(record.getValue()), record);
        }
    }
View Full Code Here

    public GetAllOperation() {
    }

    public void run() {
        int partitionId = getPartitionId();
        RecordStore recordStore = mapService.getMapServiceContext().getRecordStore(partitionId, name);
        Set<Data> partitionKeySet = new HashSet<Data>();
        for (Data key : keys) {
            if (partitionId == getNodeEngine().getPartitionService().getPartitionId(key)) {
                partitionKeySet.add(key);
            }
        }
        entrySet = recordStore.getAll(partitionKeySet);
    }
View Full Code Here

    @Override
    public void run() throws Exception {
        MapService mapService = getService();
        MapContainer mapContainer = mapService.getMapServiceContext().getMapContainer(name);
        RecordStore recordStore = mapService.getMapServiceContext()
                .getPartitionContainer(getPartitionId()).getRecordStore(name);
        IndexService indexService = mapContainer.getIndexService();
        SerializationService ss = getNodeEngine().getSerializationService();
        Index index = indexService.addOrGetIndex(attributeName, ordered);
        final long now = getNow();
        final Iterator<Record> iterator = recordStore.iterator(now, false);
        while (iterator.hasNext()) {
            final Record record = iterator.next();
            Data key = record.getKey();
            Object value = record.getValue();
            index.saveEntryIndex(new QueryEntry(ss, key, key, value));
View Full Code Here

    public ContainsValueOperation() {
    }

    public void run() {
        MapService mapService = getService();
        RecordStore recordStore = mapService.getMapServiceContext().getRecordStore(getPartitionId(), name);
        contains = recordStore.containsValue(testValue);
        if (mapContainer.getMapConfig().isStatisticsEnabled()) {
            ((MapService) getService()).getMapServiceContext().getLocalMapStatsProvider()
                    .getLocalMapStatsImpl(name).incrementOtherOperations();
        }
    }
View Full Code Here

                    return;
                }
                final Data key = (Data) storeEvent.getSource().getKey();
                final int partitionId = delayedEntry.getPartitionId();
                final PartitionContainer partitionContainer = mapServiceContext.getPartitionContainer(partitionId);
                final RecordStore recordStore = partitionContainer.getExistingRecordStore(mapContainer.getName());
                if (recordStore != null) {
                    recordStore.getMapDataStore().addTransient(key, Clock.currentTimeMillis());
                }
            }
        });
        return writeBehindProcessor;
    }
View Full Code Here

        List<DelayedEntry> entries = Collections.emptyList();
        boolean createLazy = true;
        for (int partitionId = 0; partitionId < partitionCount; partitionId++) {
            final InternalPartition partition = partitionService.getPartition(partitionId, false);
            final Address owner = partition.getOwnerOrNull();
            final RecordStore recordStore = getRecordStoreOrNull(mapName, partitionId);
            if (owner == null || recordStore == null) {
                // no-op because no owner is set yet.
                // Therefore we don't know anything about the map
                continue;
            }
View Full Code Here

    }

    private void removeProcessed(String mapName, Map<Integer, List<DelayedEntry>> entryListPerPartition) {
        for (Map.Entry<Integer, List<DelayedEntry>> entry : entryListPerPartition.entrySet()) {
            final int partitionId = entry.getKey();
            final RecordStore recordStore = getRecordStoreOrNull(mapName, partitionId);
            if (recordStore == null) {
                continue;
            }
            final WriteBehindQueue<DelayedEntry> queue = getWriteBehindQueue(recordStore);
            final List<DelayedEntry> entries = entry.getValue();
View Full Code Here

TOP

Related Classes of com.hazelcast.map.impl.RecordStore

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.