+ more javadocs added

This commit is contained in:
Costin Leau
2010-12-07 19:00:06 +02:00
parent bd46e4a04c
commit ac7432f014
6 changed files with 56 additions and 11 deletions

View File

@@ -20,7 +20,7 @@ import java.util.Collection;
import java.util.List;
/**
* Commands supported by Redis .
* Interface for the commands supported by Redis.
*
* @author Costin Leau
*/

View File

@@ -19,23 +19,35 @@ package org.springframework.data.keyvalue.redis.connection;
import org.springframework.data.keyvalue.redis.UncategorizedRedisException;
/**
* A connection to a Redis server.
* A connection to a Redis server. Acts as an common abstraction across various
* Redis client libraries (or drivers). Additionally performs exception translation
* between the underlying Redis client library and Spring DAO exceptions.
*
* The methods follow as much as possible the Redis names and conventions.
*
* The methods follow as much as possible the Redis names and conventions.
*
* @author Costin Leau
*/
public interface RedisConnection extends RedisCommands {
/**
* Close (or quit) the connection.
* Closes (or quits) the connection.
*
* @throws UncategorizedRedisException
* @throws UncategorizedRedisException in case of exceptions
*/
void close() throws UncategorizedRedisException;
/**
* Indicates whether the underlying connection is closed or not.
*
* @return true if the connection is closed, false otherwise.
*/
boolean isClosed();
/**
* Returns the native connection (the underlying library/driver object).
*
* @return underlying, native object
*/
Object getNativeConnection();
/**

View File

@@ -19,12 +19,16 @@ package org.springframework.data.keyvalue.redis.connection;
import org.springframework.dao.support.PersistenceExceptionTranslator;
/**
* Thread-safe factory of Redis connections. Additionally performs exception translation
* between the underlying Redis connection library and Spring DAO exceptions.
* Thread-safe factory of Redis connections.
*
* @author Costin Leau
*/
public interface RedisConnectionFactory extends PersistenceExceptionTranslator {
/**
* Provides a suitable connection for interacting with Redis.
*
* @return connection for interacting with Redis.
*/
RedisConnection getConnection();
}

View File

@@ -20,7 +20,7 @@ import java.util.List;
import java.util.Map;
/**
* String specific commands supported by Redis.
* String/Value-specific commands supported by Redis.
*
* @author Costin Leau
*/

View File

@@ -19,7 +19,7 @@ import java.util.List;
/**
* Redis transaction (aka batch) commands.
* Transaction/Batch specific commands supported by Redis.
*
* @author Costin Leau
*/

View File

@@ -49,13 +49,42 @@ public interface SortParameters {
}
}
/**
* Returns the sorting order. Can be null if nothing is specified.
*
* @return sorting order
*/
Order getOrder();
/**
* Indicates if the sorting is numeric (default) or alphabetical (lexicographical).
* Can be null if nothing is specified.
*
* @return the type of sorting
*/
Boolean isAlphabetic();
/**
* Returns the pattern (if set) for sorting by external keys (<tt>BY</tt>).
* Can be null if nothing is specified.
*
* @return <tt>BY</tt> pattern.
*/
byte[] getByPattern();
/**
* Returns the pattern (if set) for retrieving external keys (<tt>GET</tt>).
* Can be null if nothing is specified.
*
* @return <tt>GET</tt> pattern.
*/
byte[] getGetPattern();
/**
* Returns the sorting limit (range or pagination).
* Can be null if nothing is specified.
*
* @return sorting limit/range
*/
Range getLimit();
}
}