Package voldemort.rest

Examples of voldemort.rest.GetResponseSender.sendResponse()


                            if(keyExists) {
                                GetResponseSender responseConstructor = new GetResponseSender(messageEvent,
                                                                                              requestObject.getKey(),
                                                                                              versionedValues,
                                                                                              this.storeClient.getStoreName());
                                responseConstructor.sendResponse(this.coordinatorPerfStats,
                                                                 true,
                                                                 this.requestObject.getRequestOriginTimeInMs());
                                if(logger.isDebugEnabled()) {
                                    logger.debug("GET successful !");
                                }
View Full Code Here


                                                                    "Error when doing getall. Keys do not exist.");
                            } else {
                                GetAllResponseSender responseConstructor = new GetAllResponseSender(messageEvent,
                                                                                                    versionedResponses,
                                                                                                    this.storeClient.getStoreName());
                                responseConstructor.sendResponse(this.coordinatorPerfStats,
                                                                 true,
                                                                 this.requestObject.getRequestOriginTimeInMs());

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

                            PutResponseSender responseConstructor = new PutResponseSender(messageEvent,
                                                                                          successfulPutVC,
                                                                                          this.storeClient.getStoreName(),
                                                                                          this.requestObject.getKey());
                            responseConstructor.sendResponse(this.coordinatorPerfStats,
                                                             true,
                                                             this.requestObject.getRequestOriginTimeInMs());

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

                            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

                            if(versionedValues.size() > 0) {
                                GetResponseSender responseConstructor = new GetResponseSender(messageEvent,
                                                                                              requestObject.getKey(),
                                                                                              versionedValues,
                                                                                              storeName);
                                responseConstructor.sendResponse(performanceStats,
                                                                 fromLocalZone,
                                                                 requestObject.getRequestOriginTimeInMs());

                            } else {
                                logger.error("Error when doing get. Key does not exist");
View Full Code Here

                            }
                            if(hasAtleastOneValidKey) {
                                GetAllResponseSender responseConstructor = new GetAllResponseSender(messageEvent,
                                                                                                    keyValuesMap,
                                                                                                    storeName);
                                responseConstructor.sendResponse(performanceStats,
                                                                 fromLocalZone,
                                                                 requestObject.getRequestOriginTimeInMs());
                            } else {
                                logger.error("Error when doing getall. Key does not exist or key is null");
                                RestErrorHandler.writeErrorResponse(messageEvent,
View Full Code Here

                            logger.debug("Incoming put request");
                        }
                        try {
                            store.put(requestObject.getKey(), requestObject.getValue(), null);
                            PutResponseSender responseConstructor = new PutResponseSender(messageEvent);
                            responseConstructor.sendResponse(performanceStats,
                                                             fromLocalZone,
                                                             requestObject.getRequestOriginTimeInMs());
                        } catch(Exception e) {
                            putErrorHandler.handleExceptions(messageEvent, e);
                        }
View Full Code Here

                                                                    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);
                        }
View Full Code Here

                            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
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.