Examples of toData()


Examples of com.hazelcast.nio.serialization.SerializationService.toData()

        List<Data> dataArrayList = new ArrayList<Data>(distributedObjects.size());
        for (DistributedObject distributedObject : distributedObjects) {
            DistributedObjectInfo distributedObjectInfo = new DistributedObjectInfo(
                    distributedObject.getServiceName(), distributedObject.getName());
            Data data = serializationService.toData(distributedObjectInfo);
            dataArrayList.add(data);
        }
        SerializableCollection collection = new SerializableCollection(dataArrayList);
        endpoint.sendResponse(collection, getCallId());
    }
View Full Code Here

Examples of com.hazelcast.nio.serialization.SerializationService.toData()

        final Collection<MemberImpl> memberList = service.getMemberList();
        final Collection<Data> response = new ArrayList<Data>(memberList.size());
        final SerializationService serializationService = getClientEngine().getSerializationService();
        for (MemberImpl member : memberList) {
            response.add(serializationService.toData(member));
        }
        return new SerializableCollection(response);
    }

    public String getServiceName() {
View Full Code Here

Examples of com.hazelcast.nio.serialization.SerializationService.toData()

        throw new AuthenticationException();
    }

    public Object sendAndReceive(ClientRequest request, ClientConnection connection) throws Exception {
        final SerializationService ss = client.getSerializationService();
        connection.write(ss.toData(request));
        final Data data = connection.read();
        ClientResponse clientResponse = ss.toObject(data);
        Object response = ss.toObject(clientResponse.getResponse());
        if (response instanceof Throwable) {
            Throwable t = (Throwable) response;
View Full Code Here

Examples of com.hazelcast.nio.serialization.SerializationService.toData()

    private void _send(ClientCallFuture future, ClientConnection connection) {
        connection.registerCallId(future);
        future.setConnection(connection);
        final SerializationService ss = client.getSerializationService();
        final Data data = ss.toData(future.getRequest());
        if (!connection.write(new DataAdapter(data))) {
            final int callId = future.getRequest().getCallId();
            connection.deRegisterCallId(callId);
            connection.deRegisterEventHandler(callId);
            future.notify(new TargetNotMemberException("Address : " + connection.getRemoteEndpoint()));
View Full Code Here

Examples of com.hazelcast.spi.NodeEngine.toData()

        response = input;
        //noinspection unchecked
        Object output = f.apply(input);
        shouldBackup = !isEquals(input, output);
        if (shouldBackup) {
            backup = nodeEngine.toData(output);
            reference.set(backup);
        }
    }
}
View Full Code Here

Examples of com.hazelcast.spi.NodeEngine.toData()

        ReferenceWrapper reference = getReference();

        Object input = nodeEngine.toObject(reference.get());
        //noinspection unchecked
        Object output = f.apply(input);
        returnValue = nodeEngine.toData(output);
    }

    @Override
    public Object getResponse() {
        return returnValue;
View Full Code Here

Examples of com.hazelcast.spi.NodeEngine.toData()

        Object input = nodeEngine.toObject(reference.get());
        //noinspection unchecked
        Object output = f.apply(input);
        shouldBackup = true;
        backup = nodeEngine.toData(output);
        reference.set(backup);
        response = output;
    }
}
View Full Code Here

Examples of com.hazelcast.spi.NodeEngine.toData()

        Object input = nodeEngine.toObject(reference.get());
        //noinspection unchecked
        Object output = f.apply(input);
        shouldBackup = !isEquals(input, output);
        if (shouldBackup) {
            backup = nodeEngine.toData(output);
            reference.set(backup);
        }
    }
}
View Full Code Here

Examples of com.hazelcast.spi.NodeEngine.toData()

        offer(e, -1, TimeUnit.MILLISECONDS);
    }

    public boolean offer(E e, long timeout, TimeUnit timeUnit) throws InterruptedException {
        final NodeEngine nodeEngine = getNodeEngine();
        final Data data = nodeEngine.toData(e);
        return offerInternal(data, timeUnit.toMillis(timeout));
    }

    public E take() throws InterruptedException {
        return poll(-1, TimeUnit.MILLISECONDS);
View Full Code Here

Examples of com.hazelcast.spi.NodeEngine.toData()

        return config.getMaxSize() - size();
    }

    public boolean remove(Object o) {
        final NodeEngine nodeEngine = getNodeEngine();
        final Data data = nodeEngine.toData(o);
        return removeInternal(data);
    }

    public boolean contains(Object o) {
        final NodeEngine nodeEngine = getNodeEngine();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.