Package com.hazelcast.map.impl.record

Examples of com.hazelcast.map.impl.record.Record


    public void run() {
        final long now = getNow();

        final Iterator<Record> iterator = recordStore.iterator(now, false);
        while (iterator.hasNext()) {
            final Record record = iterator.next();
            final Data dataKey = record.getKey();
            final Object oldValue = record.getValue();

            final Object key = toObject(dataKey);
            final Object value = toObject(oldValue);

            if (!applyPredicate(dataKey, key, value)) {
View Full Code Here


    }

    @Override
    public void run() {
        recordStore.unlock(dataKey, ownerUuid, getThreadId());
        Record record = recordStore.getRecord(dataKey);
        if (record == null || version == record.getVersion()) {
            dataOldValue = getNodeEngine().toData(recordStore.remove(dataKey));
            successful = dataOldValue != null;
        }
    }
View Full Code Here

                final MapEventPublisher mapEventPublisher = mapServiceContext.getMapEventPublisher();
                mapEventPublisher.publishEvent(getCallerAddress(), name, eventType, dataKey, dataOldValue, dataValue);
                keysToInvalidate.add(dataKey);

                // check in case of an expiration.
                final Record record = recordStore.getRecordOrNull(dataKey);
                if (record == null) {
                    continue;
                }
                if (mapContainer.getWanReplicationPublisher() != null && mapContainer.getWanMergePolicy() != null) {
                    final Data dataValueAsData = mapServiceContext.toData(dataValue);
View Full Code Here

    public PutBackupOperation() {
    }

    public void run() {
        final Record record = recordStore.putBackup(dataKey, dataValue, ttl);
        if (recordInfo != null) {
            Records.applyRecordInfo(record, recordInfo);
        }
        if (unlockKey) {
            recordStore.forceUnlock(dataKey);
View Full Code Here

        }
        final MapEventPublisher mapEventPublisher = getMapEventPublisher();
        if (EntryEventType.REMOVED.equals(eventType)) {
            mapEventPublisher.publishWanReplicationRemove(name, key, getNow());
        } else {
            final Record record = recordStore.getRecord(key);
            if (record != null) {
                final Data dataValueAsData = toData(value);
                final EntryView entryView = createSimpleEntryView(key, dataValueAsData, record);
                mapEventPublisher.publishWanReplicationUpdate(name, entryView);
            }
View Full Code Here

    public void run() {
        final long now = getNow();

        final Iterator<Record> iterator = recordStore.iterator(now, true);
        while (iterator.hasNext()) {
            final Record record = iterator.next();
            final Data dataKey = record.getKey();
            final Object oldValue = record.getValue();

            final Object key = toObject(dataKey);
            final Object value = toObject(oldValue);

            if (!applyPredicate(dataKey, key, value)) {
View Full Code Here

        final int evictableBaseIndex = getEvictionStartIndex(criterias, evictableSize);
        final long criteriaValue = criterias[evictableBaseIndex];
        int evictedRecordCounter = 0;
        final Iterator<Record> iterator = recordStore.iterator();
        while (iterator.hasNext()) {
            final Record record = iterator.next();
            final long value = getEvictionCriteriaValue(record, evictionPolicy);
            if (value <= criteriaValue) {
                final Data tmpKey = record.getKey();
                final Object tmpValue = record.getValue();
                if (evictIfNotLocked(tmpKey, recordStore, backup)) {
                    evictedRecordCounter++;
                    final String mapName = mapConfig.getName();
                    if (!backup) {
                        interceptAndInvalidate(mapServiceContext, value, tmpKey, mapName);
View Full Code Here

        final int size = recordStore.size();
        long[] criterias = null;
        int index = 0;
        final Iterator<Record> iterator = recordStore.iterator();
        while (iterator.hasNext()) {
            final Record record = iterator.next();
            if (criterias == null) {
                criterias = new long[size];
            }
            criterias[index] = getEvictionCriteriaValue(record, evictionPolicy);
            index++;
View Full Code Here

        int partitionId = getPartitionId();
        recordStore = mapService.getMapServiceContext().getRecordStore(partitionId, name);
        for (int i = 0; i < entries.size(); i++) {
            final RecordInfo recordInfo = recordInfos.get(i);
            final Map.Entry<Data, Data> entry = entries.get(i);
            final Record record = recordStore.putBackup(entry.getKey(), entry.getValue());
            Records.applyRecordInfo(record, recordInfo);
        }
    }
View Full Code Here

    }

    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

TOP

Related Classes of com.hazelcast.map.impl.record.Record

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.