CancellableDelegatingFuture(InternalCompletableFuture future, NodeEngine nodeEngine, String uuid, int partitionId) { super(future, nodeEngine.getSerializationService()); this.nodeEngine = nodeEngine; this.uuid = uuid; this.partitionId = partitionId; this.target = null; }
CancellableDelegatingFuture(InternalCompletableFuture future, NodeEngine nodeEngine, String uuid, Address target) { super(future, nodeEngine.getSerializationService()); this.nodeEngine = nodeEngine; this.uuid = uuid; this.target = target; this.partitionId = -1; }
CancellableDelegatingFuture(InternalCompletableFuture future, NodeEngine nodeEngine, String uuid, Address target) { super(future, nodeEngine.getSerializationService()); this.nodeEngine = nodeEngine; this.uuid = uuid; this.target = target; this.partitionId = -1; }
@Nonnull public static BufferObjectDataOutput createObjectDataOutput(@Nonnull NodeEngine engine) { return ((InternalSerializationService) engine.getSerializationService()) .createObjectDataOutput(BUFFER_SIZE); }
public Data toData(Object object) { if (object == null) { return null; } if (object instanceof Data) { return (Data) object; } else { return nodeEngine.getSerializationService().toData(object); } }
public InvokeOnMembers(NodeEngine nodeEngine, String serviceName, Supplier<Operation> operationFactory, Collection<Member> targets) { this.logger = nodeEngine.getLogger(getClass()); this.operationService = nodeEngine.getOperationService(); this.serializationService = nodeEngine.getSerializationService(); this.serviceName = serviceName; this.operationFactory = operationFactory; this.targets = targets; this.futures = new HashMap<Member, Future>(targets.size()); this.results = new HashMap<Member, Object>(targets.size()); }
public MapIndexSynchronizer(MapServiceContext mapServiceContext, NodeEngine nodeEngine) { this.mapServiceContext = mapServiceContext; this.operationService = nodeEngine.getOperationService(); this.serializationService = nodeEngine.getSerializationService(); this.nodeEngine = nodeEngine; this.logger = nodeEngine.getLogger(getClass()); }
public MapEventPublishingService(MapServiceContext mapServiceContext) { this.mapServiceContext = mapServiceContext; this.nodeEngine = mapServiceContext.getNodeEngine(); this.serializationService = mapServiceContext.getNodeEngine().getSerializationService(); }
@Override public Iterator<E> iterator() { final NodeEngine nodeEngine = getNodeEngine(); return new QueueIterator<E>(listInternal().iterator(), nodeEngine.getSerializationService(), false); }
public PartitionScanRunner(MapServiceContext mapServiceContext) { this.mapServiceContext = mapServiceContext; this.nodeEngine = mapServiceContext.getNodeEngine(); this.serializationService = (InternalSerializationService) nodeEngine.getSerializationService(); this.partitionService = nodeEngine.getPartitionService(); this.logger = nodeEngine.getLogger(getClass()); this.operationService = nodeEngine.getOperationService(); this.clusterService = nodeEngine.getClusterService(); }
private void injectManagedContext(Object injectee, Object... injectees) { ManagedContext managedContext = getNodeEngine().getSerializationService().getManagedContext(); if (injectee != null) { managedContext.initialize(injectee); } for (Object otherInjectee : injectees) { if (otherInjectee != null) { managedContext.initialize(otherInjectee); } } }
private void injectManagedContext(Object injectee, Object... injectees) { ManagedContext managedContext = getNodeEngine().getSerializationService().getManagedContext(); if (injectee != null) { managedContext.initialize(injectee); } for (Object otherInjectee : injectees) { if (otherInjectee != null) { managedContext.initialize(otherInjectee); } } }
private Set<RecordMigrationInfo> getRecordSet(ReplicatedRecordStore store) { SerializationService serializationService = getNodeEngine().getSerializationService(); Set<RecordMigrationInfo> recordSet = createHashSet(store.size()); Iterator<ReplicatedRecord> iterator = store.recordIterator(); while (iterator.hasNext()) { ReplicatedRecord record = iterator.next(); Data dataKey = serializationService.toData(record.getKeyInternal()); Data dataValue = serializationService.toData(record.getValueInternal()); recordSet.add(new RecordMigrationInfo(dataKey, dataValue, record.getTtlMillis())); } return recordSet; }
public ClusterWideIterator(CacheProxy<K, V> cache, int fetchSize, boolean prefetchValues) { super(cache, cache.getNodeEngine().getPartitionService().getPartitionCount(), fetchSize, prefetchValues); this.cacheProxy = cache; this.serializationService = cache.getNodeEngine().getSerializationService(); advance(); }
public ClusterWideIterator(CacheProxy<K, V> cache, int fetchSize, boolean prefetchValues) { super(cache, cache.getNodeEngine().getPartitionService().getPartitionCount(), fetchSize, prefetchValues); this.cacheProxy = cache; this.serializationService = cache.getNodeEngine().getSerializationService(); advance(); }
@Override public List<E> subList(int fromIndex, int toIndex) { ListSubOperation operation = new ListSubOperation(name, fromIndex, toIndex); SerializableList result = invoke(operation); List<Data> collection = result.getCollection(); SerializationService serializationService = getNodeEngine().getSerializationService(); return new UnmodifiableLazyList<E>(collection, serializationService); }
public ClusterWideIterator(CacheProxy<K, V> cache, int fetchSize, int partitionId, boolean prefetchValues) { super(cache, cache.getNodeEngine().getPartitionService().getPartitionCount(), fetchSize, prefetchValues); this.cacheProxy = cache; this.serializationService = cache.getNodeEngine().getSerializationService(); this.partitionIndex = partitionId; advance(); }
@Override public void innerBeforeRun() throws Exception { super.innerBeforeRun(); this.begin = Clock.currentTimeMillis(); this.readOnly = entryProcessor instanceof ReadOnly; SerializationService serializationService = getNodeEngine().getSerializationService(); ManagedContext managedContext = serializationService.getManagedContext(); managedContext.initialize(entryProcessor); }
private ExecutionPlan deserializePlan(Data planBlob) { JetService service = getService(); ClassLoader cl = service.getClassLoader(jobId()); return deserializeWithCustomClassLoader(getNodeEngine().getSerializationService(), cl, planBlob); } }
private DataAwareEntryEvent createDataAwareEntryEvent(EntryEventData entryEventData, Member member) { return new DataAwareEntryEvent(member, entryEventData.getEventType(), entryEventData.getMapName(), entryEventData.getDataKey(), entryEventData.getDataNewValue(), entryEventData.getDataOldValue(), entryEventData.getDataMergingValue(), nodeEngine.getSerializationService()); }