Examples of RedisConnectionException


Examples of com.cetsoft.imcache.cache.redis.client.exception.RedisConnectionException

            if (!isConnected())
                connect();
            socket.setKeepAlive(true);
            socket.setSoTimeout(0);
        } catch (SocketException e) {
            throw new RedisConnectionException(e);
        }
    }
View Full Code Here

Examples of com.cetsoft.imcache.cache.redis.client.exception.RedisConnectionException

    public void rollbackTimeout(int timeout) {
        try {
            socket.setKeepAlive(true);
            socket.setSoTimeout(timeout);
        } catch (SocketException e) {
            throw new RedisConnectionException(e);
        }
    }
View Full Code Here

Examples of com.cetsoft.imcache.cache.redis.client.exception.RedisConnectionException

                socket.connect(new InetSocketAddress(host, port), timeout);
                socket.setSoTimeout(timeout);
                outputStream = new RedisOutputStream(socket.getOutputStream());
                inputStream = new RedisInputStream(socket.getInputStream());
            } catch (IOException e) {
                throw new RedisConnectionException(e);
            }
        }
    }
View Full Code Here

Examples of com.cetsoft.imcache.cache.redis.client.exception.RedisConnectionException

                outputStream.close();
                if (!socket.isClosed()) {
                    socket.close();
                }
            } catch (IOException e) {
                throw new RedisConnectionException(e);
            }
        }
    }
View Full Code Here

Examples of com.cetsoft.imcache.cache.redis.client.exception.RedisConnectionException

    protected void flush() {
        try {
            outputStream.flush();
        } catch (IOException e) {
            broken = true;
            throw new RedisConnectionException(e);
        }
    }
View Full Code Here

Examples of com.cetsoft.imcache.cache.redis.client.exception.RedisConnectionException

                os.writeIntCrLf(arg.length);
                os.write(arg);
                os.writeCrLf();
            }
        } catch (IOException e) {
            throw new RedisConnectionException(e);
        }
    }
View Full Code Here

Examples of com.cetsoft.imcache.cache.redis.client.exception.RedisConnectionException

            } else if (b == DOLLAR_BYTE) {
                return processBulkReply(is);
            } else if (b == PLUS_BYTE) {
                return processStatusCodeReply(is);
            } else {
                throw new RedisConnectionException("unknown reply: " + (char) b);
            }
        } catch (IOException e) {
            throw new RedisConnectionException(e);
        }

        return null;
    }
View Full Code Here

Examples of com.cetsoft.imcache.cache.redis.client.exception.RedisConnectionException

        int offset = 0;
        try {
            while (offset < len) {
                int size = is.read(read, offset, (len - offset));
                if (size == -1) {
                    throw new RedisConnectionException("it seems that server has closed the connection");
                }

                offset += size;
            }

            // read 2 more bytes
            is.readByte();
            is.readByte();
        } catch (IOException e) {
            throw new RedisConnectionException(e);
        }

        return read;
    }
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.