Package voldemort.rest

Examples of voldemort.rest.VectorClockWrapper


                int contentLength = Integer.parseInt(part.getHeader(RestMessageHeaders.CONTENT_LENGTH)[0]);

                if(logger.isDebugEnabled()) {
                    logger.debug("Received VC : " + serializedVC);
                }
                VectorClockWrapper vcWrapper = mapper.readValue(serializedVC,
                                                                VectorClockWrapper.class);

                InputStream input = part.getInputStream();
                byte[] bodyPartBytes = new byte[contentLength];
                input.read(bodyPartBytes);

                VectorClock clock = new VectorClock(vcWrapper.getVersions(),
                                                    vcWrapper.getTimestamp());
                results.add(new Versioned<byte[]>(bodyPartBytes, clock));

            }

        } catch(MessagingException e) {
View Full Code Here


                    if(logger.isDebugEnabled()) {
                        logger.debug("Received serialized Vector Clock : " + serializedVC);
                    }

                    VectorClockWrapper vcWrapper = mapper.readValue(serializedVC,
                                                                    VectorClockWrapper.class);

                    // get the value bytes
                    InputStream input = valuePart.getInputStream();
                    byte[] bodyPartBytes = new byte[contentLength];
                    input.read(bodyPartBytes);

                    VectorClock clock = new VectorClock(vcWrapper.getVersions(),
                                                        vcWrapper.getTimestamp());
                    valueResultList.add(new Versioned<byte[]>(bodyPartBytes, clock));

                }
                results.put(key, valueResultList);
            }
View Full Code Here

TOP

Related Classes of voldemort.rest.VectorClockWrapper

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.