Modifier and Type | Class and Description |
---|---|
class |
RedisList.RedisListIterator
RedisList 的迭代器
|
Constructor and Description |
---|
RedisList(redis.clients.util.Pool<redis.clients.jedis.Jedis> jedisPool)
构造函数
|
RedisList(redis.clients.util.Pool<redis.clients.jedis.Jedis> jedisPool,
String name)
构造函数
|
RedisList(String name)
构造函数
|
RedisList(String host,
int port,
int timeout,
int poolsize,
String name)
构造函数
|
RedisList(String host,
int port,
int timeout,
int poolsize,
String name,
String password)
构造函数
|
Modifier and Type | Method and Description |
---|---|
void |
add(int index,
V element) |
boolean |
add(V s) |
boolean |
addAll(Collection<? extends V> c) |
boolean |
addAll(int index,
Collection<? extends V> c) |
void |
addFirst(V s) |
void |
addLast(V s) |
void |
clear() |
void |
close() |
boolean |
contains(Object o) |
boolean |
containsAll(Collection<?> c) |
Iterator<V> |
descendingIterator() |
V |
element() |
V |
get(int index) |
int |
getDbIndex()
获取当前选择的数据集
|
V |
getFirst() |
V |
getLast() |
int |
indexOf(Object o) |
boolean |
isEmpty() |
Iterator<V> |
iterator() |
int |
lastIndexOf(Object o) |
ListIterator<V> |
listIterator() |
ListIterator<V> |
listIterator(int index) |
boolean |
offer(V s) |
boolean |
offerFirst(V s) |
boolean |
offerLast(V s) |
V |
peek() |
V |
peekFirst() |
V |
peekLast() |
V |
poll() |
V |
pollFirst() |
V |
pollLast() |
V |
pop() |
void |
push(V s) |
List<V> |
range(int start,
int end)
返回存储在列表里指定范围内的元素
|
V |
remove() |
V |
remove(int index) |
boolean |
remove(Object o) |
boolean |
removeAll(Collection<?> c) |
V |
removeFirst() |
List<V> |
removeFirst(int timeout) |
boolean |
removeFirstOccurrence(Object o) |
V |
removeLast() |
List<V> |
removeLast(int timeout) |
boolean |
removeLastOccurrence(Object o) |
boolean |
retainAll(Collection<?> c) |
V |
set(int index,
V element) |
void |
setDbIndex(int dbIndex)
选择当前数据集
|
int |
size() |
List<V> |
subList(int fromIndex,
int toIndex) |
Object[] |
toArray() |
<T> T[] |
toArray(T[] a) |
boolean |
trim(int start,
int end)
修剪当前 list
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
equals, hashCode, replaceAll, sort, spliterator
parallelStream, removeIf, stream
public RedisList(String host, int port, int timeout, int poolsize, String name, String password)
host
- redis 服务地址port
- redis 服务端口timeout
- redis 连接超时时间poolsize
- redis 连接池的大小name
- 在 redis 中的 HashMap的名称password
- redis 服务密码public RedisList(String host, int port, int timeout, int poolsize, String name)
host
- redis 服务地址port
- redis 服务端口timeout
- redis 连接超时时间poolsize
- redis 连接池的大小name
- 在 redis 中的 HashMap的名称public RedisList(String name)
name
- 在 redis 中的 HashMap的名称public RedisList(redis.clients.util.Pool<redis.clients.jedis.Jedis> jedisPool, String name)
jedisPool
- redis 连接池name
- 在 redis 中的 HashMap的名称public RedisList(redis.clients.util.Pool<redis.clients.jedis.Jedis> jedisPool)
jedisPool
- redis 连接池public int getDbIndex()
public void setDbIndex(int dbIndex)
dbIndex
- 数据集序号public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
public int size()
public boolean isEmpty()
public boolean contains(Object o)
public Iterator<V> descendingIterator()
descendingIterator
in interface Deque<V>
public Object[] toArray()
public <T> T[] toArray(T[] a)
public boolean offerFirst(V s)
offerFirst
in interface Deque<V>
public V removeFirst()
removeFirst
in interface Deque<V>
public V removeLast()
removeLast
in interface Deque<V>
public boolean removeFirstOccurrence(Object o)
removeFirstOccurrence
in interface Deque<V>
public boolean removeLastOccurrence(Object o)
removeLastOccurrence
in interface Deque<V>
public boolean add(V s)
public boolean offer(V s)
public V remove()
public V poll()
public V element()
public V peek()
public boolean remove(Object o)
public boolean containsAll(Collection<?> c)
containsAll
in interface Collection<V>
containsAll
in interface List<V>
public boolean addAll(Collection<? extends V> c)
public boolean addAll(int index, Collection<? extends V> c)
public boolean removeAll(Collection<?> c)
public boolean retainAll(Collection<?> c)
public void clear()
public int lastIndexOf(Object o)
lastIndexOf
in interface List<V>
public ListIterator<V> listIterator()
listIterator
in interface List<V>
public ListIterator<V> listIterator(int index)
listIterator
in interface List<V>
public boolean trim(int start, int end)
start
- 起始偏移量, 0 是列表里的第一个元素(表头),1 是第二个元素,-1 表示列表里的最后一个元素, -2 表示倒数第二个end
- 结束偏移量, 0 是列表里的第一个元素(表头),1 是第二个元素,-1 表示列表里的最后一个元素, -2 表示倒数第二个Copyright © 2020 Voovan. All rights reserved.