protected void filterResults(BatchResult<?> result) { int t = 0; for (Integer index : indexToRemove) { index -= t; result.getResponses().remove((int)index); t++; } for (ListIterator<Object> iterator = (ListIterator<Object>) result.getResponses().listIterator(); iterator.hasNext();) { Object object = iterator.next(); if (object instanceof String) { iterator.set(((String) object).getBytes()); } } }
BatchResult<Object> result = new BatchResult<Object>(responses, syncedSlaves); promise.trySuccess(result);
BatchResult<Object> result = new BatchResult<Object>(responses, syncedSlaves); promise.trySuccess(result);
protected void filterResults(BatchResult<?> result) { int t = 0; for (Integer index : indexToRemove) { index -= t; result.getResponses().remove((int)index); t++; } for (ListIterator<Object> iterator = (ListIterator<Object>) result.getResponses().listIterator(); iterator.hasNext();) { Object object = iterator.next(); if (object instanceof String) { iterator.set(((String) object).getBytes()); } } }
BatchResult<Object> result = new BatchResult<Object>(Collections.emptyList(), 0); return (RFuture<R>) RedissonPromise.newSucceededFuture(result); BatchResult<Object> result = new BatchResult<Object>(responses, syncedSlaves); resultPromise.trySuccess((R)result); } catch (Exception e) { BatchResult<Object> result = new BatchResult<Object>(responses, syncedSlaves); promise.trySuccess(result);
protected void filterResults(BatchResult<?> result) { int t = 0; for (Integer index : indexToRemove) { index -= t; result.getResponses().remove((int)index); t++; } for (ListIterator<Object> iterator = (ListIterator<Object>) result.getResponses().listIterator(); iterator.hasNext();) { Object object = iterator.next(); if (object instanceof String) { iterator.set(((String) object).getBytes()); } } }
BatchResult<Object> result = new BatchResult<Object>(Collections.emptyList(), 0); return (RFuture<R>) RedissonPromise.newSucceededFuture(result); BatchResult<Object> result = new BatchResult<Object>(responses, syncedSlaves); resultPromise.trySuccess((R)result); } catch (Exception e) { BatchResult<Object> result = new BatchResult<Object>(responses, syncedSlaves); promise.trySuccess(result);
protected void filterResults(BatchResult<?> result) { int t = 0; for (Integer index : indexToRemove) { index -= t; result.getResponses().remove((int)index); t++; } for (ListIterator<Object> iterator = (ListIterator<Object>) result.getResponses().listIterator(); iterator.hasNext();) { Object object = iterator.next(); if (object instanceof String) { iterator.set(((String) object).getBytes()); } } }
BatchResult<Object> result = new BatchResult<Object>(responses, syncedSlaves); promise.trySuccess(result);
@Override public List<Object> closePipeline() throws RedisPipelineException { if (isPipelined()) { CommandBatchService es = (CommandBatchService) executorService; try { BatchResult<?> result = es.execute(); filterResults(result); if (isPipelinedAtomic()) { return Arrays.<Object>asList((List<Object>) result.getResponses()); } return (List<Object>) result.getResponses(); } catch (Exception ex) { throw new RedisPipelineException(ex); } finally { resetConnection(); } } return Collections.emptyList(); }
BatchResult<Object> result = new BatchResult<Object>(Collections.emptyList(), 0); return (RFuture<R>) RedissonPromise.newSucceededFuture(result); BatchResult<Object> result = new BatchResult<Object>(responses, syncedSlaves); resultPromise.trySuccess((R)result); } catch (Exception e) { BatchResult<Object> result = new BatchResult<Object>(responses, syncedSlaves); promise.trySuccess(result);
@Override public List<Object> closePipeline() throws RedisPipelineException { if (isPipelined()) { CommandBatchService es = (CommandBatchService) executorService; try { BatchResult<?> result = es.execute(); filterResults(result); if (isPipelinedAtomic()) { return Arrays.<Object>asList((List<Object>) result.getResponses()); } return (List<Object>) result.getResponses(); } catch (Exception ex) { throw new RedisPipelineException(ex); } finally { resetConnection(); } } return Collections.emptyList(); }
@Override public List<Object> closePipeline() throws RedisPipelineException { if (isPipelined()) { CommandBatchService es = (CommandBatchService) executorService; try { BatchResult<?> result = es.execute(); filterResults(result); if (isPipelinedAtomic()) { return Arrays.<Object>asList((List<Object>) result.getResponses()); } return (List<Object>) result.getResponses(); } catch (Exception ex) { throw new RedisPipelineException(ex); } finally { resetConnection(); } } return Collections.emptyList(); }
@Override public List<Object> closePipeline() throws RedisPipelineException { if (isPipelined()) { CommandBatchService es = (CommandBatchService) executorService; try { BatchResult<?> result = es.execute(); filterResults(result); if (isPipelinedAtomic()) { return Arrays.<Object>asList((List<Object>) result.getResponses()); } return (List<Object>) result.getResponses(); } catch (Exception ex) { throw new RedisPipelineException(ex); } finally { resetConnection(); } } return Collections.emptyList(); }
@Override public List<Object> exec() { if (isPipelinedAtomic()) { return null; } if (isQueueing()) { try { BatchResult<?> result = ((CommandBatchService)executorService).execute(); filterResults(result); return (List<Object>) result.getResponses(); } catch (Exception ex) { throw transform(ex); } finally { resetConnection(); } } else { throw new InvalidDataAccessApiUsageException("Not in transaction mode. Please invoke multi method"); } }
@Override public List<Object> exec() { if (isPipelinedAtomic()) { return null; } if (isQueueing()) { try { BatchResult<?> result = ((CommandBatchService)executorService).execute(); filterResults(result); return (List<Object>) result.getResponses(); } catch (Exception ex) { throw transform(ex); } finally { resetConnection(); } } else { throw new InvalidDataAccessApiUsageException("Not in transaction mode. Please invoke multi method"); } }
@Override public List<Object> exec() { if (isPipelinedAtomic()) { return null; } if (isQueueing()) { try { BatchResult<?> result = ((CommandBatchService)executorService).execute(); filterResults(result); return (List<Object>) result.getResponses(); } catch (Exception ex) { throw transform(ex); } finally { resetConnection(); } } else { throw new InvalidDataAccessApiUsageException("Not in transaction mode. Please invoke multi method"); } }
@Override public List<Object> exec() { if (isPipelinedAtomic()) { return null; } if (isQueueing()) { try { BatchResult<?> result = ((CommandBatchService)executorService).execute(); filterResults(result); return (List<Object>) result.getResponses(); } catch (Exception ex) { throw transform(ex); } finally { resetConnection(); } } else { throw new InvalidDataAccessApiUsageException("Not in transaction mode. Please invoke multi method"); } }