public final class KeyIteratorImpl extends Object implements KeyIterator
Constructor and Description |
---|
KeyIteratorImpl(LinkedList<Integer> itemNumbersList,
MemcachedClient memcachedClient,
InetSocketAddress inetSocketAddress) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Close this iterator when you don't need it any more.It is not mandatory to call this method,
but you might want to invoke this method for maximum performance.
|
InetSocketAddress |
getServerAddress()
Get current iterator's memcached server address
|
boolean |
hasNext()
Check if the iterator has more keys.
|
String |
next()
Get next key,if iterator has reached the end,throw ArrayIndexOutOfBoundsException
|
void |
setOpTimeout(long opTimeout)
Set operation timeout,default is 1000 MILLISECONDS.
|
public KeyIteratorImpl(LinkedList<Integer> itemNumbersList, MemcachedClient memcachedClient, InetSocketAddress inetSocketAddress)
public final InetSocketAddress getServerAddress()
KeyIterator
getServerAddress
in interface KeyIterator
public final void setOpTimeout(long opTimeout)
KeyIterator
setOpTimeout
in interface KeyIterator
public void close()
KeyIterator
close
in interface KeyIterator
public boolean hasNext()
KeyIterator
hasNext
in interface KeyIterator
public String next() throws MemcachedException, TimeoutException, InterruptedException
KeyIterator
next
in interface KeyIterator
MemcachedException
TimeoutException
InterruptedException
Copyright © 2021. All rights reserved.