use of com.hazelcast.spi.serialization.SerializationService in project hazelcast by hazelcast.
the class ClientListProxy method iterator.
@Override
public Iterator<E> iterator() {
ClientMessage request = ListIteratorCodec.encodeRequest(name);
ClientMessage response = invokeOnPartition(request);
ListIteratorCodec.ResponseParameters resultParameters = ListIteratorCodec.decodeResponse(response);
List<Data> resultCollection = resultParameters.response;
SerializationService serializationService = getContext().getSerializationService();
return new UnmodifiableLazyList<E>(resultCollection, serializationService).iterator();
}
use of com.hazelcast.spi.serialization.SerializationService in project hazelcast by hazelcast.
the class ClientListProxy method subList.
@Override
public List<E> subList(int fromIndex, int toIndex) {
ClientMessage request = ListSubCodec.encodeRequest(name, fromIndex, toIndex);
ClientMessage response = invokeOnPartition(request);
ListSubCodec.ResponseParameters resultParameters = ListSubCodec.decodeResponse(response);
List<Data> resultCollection = resultParameters.response;
SerializationService serializationService = getContext().getSerializationService();
return new UnmodifiableLazyList<E>(resultCollection, serializationService);
}
use of com.hazelcast.spi.serialization.SerializationService in project hazelcast by hazelcast.
the class ClientExecutorServiceProxy method submitToTargetInternal.
private <T> void submitToTargetInternal(Callable<T> task, Address address, ExecutionCallback<T> callback) {
checkNotNull(task, "task should not be null");
String uuid = getUUID();
ClientMessage request = ExecutorServiceSubmitToAddressCodec.encodeRequest(name, uuid, toData(task), address);
ClientInvocationFuture f = invokeOnTarget(request, address);
SerializationService serializationService = getContext().getSerializationService();
ClientDelegatingFuture<T> delegatingFuture = new ClientDelegatingFuture<T>(f, serializationService, SUBMIT_TO_ADDRESS_DECODER);
delegatingFuture.andThen(callback);
}
use of com.hazelcast.spi.serialization.SerializationService in project hazelcast by hazelcast.
the class QueueContainer method setConfig.
public void setConfig(QueueConfig config, NodeEngine nodeEngine, QueueService service) {
this.nodeEngine = nodeEngine;
this.service = service;
this.logger = nodeEngine.getLogger(QueueContainer.class);
this.config = new QueueConfig(config);
// init queue store.
final QueueStoreConfig storeConfig = config.getQueueStoreConfig();
final SerializationService serializationService = nodeEngine.getSerializationService();
ClassLoader classLoader = nodeEngine.getConfigClassLoader();
this.store = QueueStoreWrapper.create(name, storeConfig, serializationService, classLoader);
}
use of com.hazelcast.spi.serialization.SerializationService in project hazelcast by hazelcast.
the class AddIndexOperation method run.
@Override
public void run() throws Exception {
Indexes indexes = mapContainer.getIndexes();
Index index = indexes.addOrGetIndex(attributeName, ordered);
final long now = getNow();
final Iterator<Record> iterator = recordStore.iterator(now, false);
SerializationService serializationService = getNodeEngine().getSerializationService();
while (iterator.hasNext()) {
final Record record = iterator.next();
Data key = record.getKey();
Object value = Records.getValueOrCachedValue(record, serializationService);
QueryableEntry queryEntry = mapContainer.newQueryEntry(key, value);
index.saveEntryIndex(queryEntry, null);
}
}
Aggregations