Package voldemort.rest

Examples of voldemort.rest.DeleteResponseSender


                        }

                        try {
                            boolean isDeleted = this.storeClient.deleteWithCustomTimeout(this.requestObject);
                            if(isDeleted) {
                                DeleteResponseSender responseConstructor = new DeleteResponseSender(messageEvent,
                                                                                                    this.storeClient.getStoreName(),
                                                                                                    this.requestObject.getKey());
                                responseConstructor.sendResponse(this.coordinatorPerfStats,
                                                                 true,
                                                                 this.requestObject.getRequestOriginTimeInMs());

                                if(logger.isDebugEnabled()) {
                                    logger.debug("DELETE request successful !");
View Full Code Here


                                RestErrorHandler.writeErrorResponse(messageEvent,
                                                                    NOT_FOUND,
                                                                    "Non Existing key/version. Nothing to delete");
                                break;
                            }
                            DeleteResponseSender responseConstructor = new DeleteResponseSender(messageEvent);
                            responseConstructor.sendResponse(performanceStats,
                                                             fromLocalZone,
                                                             requestObject.getRequestOriginTimeInMs());
                        } catch(Exception e) {
                            deleteErrorHandler.handleExceptions(messageEvent, e);
                        }
                        break;

                    case VoldemortOpCode.GET_VERSION_OP_CODE:

                        if(logger.isDebugEnabled()) {
                            logger.debug("Incoming get version request");
                        }
                        try {
                            List<Version> versions = store.getVersions(requestObject.getKey());

                            // handle non existing key
                            if(versions.size() > 0) {
                                GetVersionResponseSender responseConstructor = new GetVersionResponseSender(messageEvent,
                                                                                                            requestObject.getKey(),
                                                                                                            versions,
                                                                                                            storeName);
                                responseConstructor.sendResponse(performanceStats,
                                                                 fromLocalZone,
                                                                 requestObject.getRequestOriginTimeInMs());

                            } else {
                                logger.error("Error when doing getversion. Key does not exist or key is null");
View Full Code Here

TOP

Related Classes of voldemort.rest.DeleteResponseSender

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.