T - public class CacheImpl<T> extends AbstractList<T> implements Cache<T>
| Modifier and Type | Field and Description |
|---|---|
protected List<T> |
data |
modCount| Modifier and Type | Method and Description |
|---|---|
boolean |
add(T e) |
void |
close() |
T |
get(int index)
A call to get blocks until the cache is complete
|
int |
getCurrentSize()
Size returns the current number of items in the cache
|
List<T> |
getData() |
boolean |
isAbandoned() |
boolean |
isComplete() |
Iterator<T> |
iterator() |
void |
setAbandoned() |
void |
setAbandoned(boolean isAbandoned) |
void |
setComplete() |
void |
setComplete(boolean status) |
int |
size() |
add, addAll, clear, equals, hashCode, indexOf, lastIndexOf, listIterator, listIterator, remove, removeRange, set, subListaddAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitadd, addAll, addAll, clear, contains, containsAll, equals, hashCode, indexOf, isEmpty, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, replaceAll, retainAll, set, sort, spliterator, subList, toArray, toArrayparallelStream, removeIf, streampublic boolean isComplete()
isComplete in interface Cache<T>public void setComplete(boolean status)
public boolean isAbandoned()
isAbandoned in interface Cache<T>public void setAbandoned(boolean isAbandoned)
public boolean add(T e)
add in interface Collection<T>add in interface List<T>add in class AbstractList<T>public int size()
size in interface Collection<T>size in interface List<T>size in class AbstractCollection<T>public int getCurrentSize()
getCurrentSize in interface Cache<T>public void setComplete()
setComplete in interface Cache<T>public void setAbandoned()
setAbandoned in interface Cache<T>public T get(int index)
public void close()
throws Exception
close in interface AutoCloseableExceptionCopyright © 2018. All rights reserved.