E
- the element typeID
- the ID type of the element typepublic abstract class PgxCollection<E extends PgxEntity<ID>,ID extends Comparable<ID>> extends PgxManagedObject implements Iterable<E>
Modifier and Type | Method and Description |
---|---|
void |
addAll(Collection<E> source)
Blocking version of
#addAllAsync() . |
void |
addAll(E[] elements)
Blocking version of
#addAllAsync() . |
abstract void |
addAll(ID... ids) |
PgxFuture<Void> |
addAllAsync(Collection<E> source)
Add vertices/edges to an existing vertex/edge collection
|
PgxFuture<Void> |
addAllAsync(E[] elements)
Add vertices/edges to an existing vertex/edge collection
|
void |
clear()
Blocking version of
clearAsync() . |
PgxFuture<Void> |
clearAsync()
Clear an existing vertex/edge collection
|
PgxCollection<E,ID> |
clone() |
PgxCollection<E,ID> |
clone(String newName) |
PgxFuture<PgxCollection<E,ID>> |
cloneAsync()
Convenience method around
cloneAsync(String) passing name as null Clone an existing vertex/edge collection. |
PgxFuture<PgxCollection<E,ID>> |
cloneAsync(String newName)
Clone an existing vertex/edge collection.
|
CollectionType |
getCollectionType()
Gets the collection type.
|
EntityType |
getElementType()
Gets the element type.
|
PgxGraph |
getGraph()
Gets the graph.
|
String |
getName() |
Iterator<E> |
iterator()
Blocking version of
iteratorAsync() . |
PgxFuture<Iterator<E>> |
iteratorAsync()
Gets an Iterator over the collection.
|
void |
removeAll(Collection<E> source)
Blocking version of
#removeAllAsync() . |
abstract void |
removeAll(ID... ids) |
PgxFuture<Void> |
removeAllAsync(Collection<E> source)
Remove vertices/edges from an existing vertex/edge collection
|
int |
size()
Blocking version of
sizeAsync() . |
PgxFuture<Integer> |
sizeAsync()
Gets the number of elements in this collection
|
String |
toString() |
equals, hashCode
close, destroy, destroyAsync
@Generated(value="src/python/synchronize.py") public void addAll(Collection<E> source) throws ExecutionException, InterruptedException
#addAllAsync()
. Calls #addAllAsync()
and waits for the returned PgxFuture
to complete.InterruptedException
- if the caller thread gets interrupted while waiting for completion.ExecutionException
- if any exception occurred during asynchronous execution. The actual exception will be nested.@Generated(value="src/python/synchronize.py") public void addAll(E[] elements) throws ExecutionException, InterruptedException
#addAllAsync()
. Calls #addAllAsync()
and waits for the returned PgxFuture
to complete.InterruptedException
- if the caller thread gets interrupted while waiting for completion.ExecutionException
- if any exception occurred during asynchronous execution. The actual exception will be nested.public abstract void addAll(ID... ids) throws ExecutionException, InterruptedException
public PgxFuture<Void> addAllAsync(Collection<E> source)
source
- vertices/edges to addpublic PgxFuture<Void> addAllAsync(E[] elements)
elements
- vertices/edges to add@Generated(value="src/python/synchronize.py") public void clear() throws ExecutionException, InterruptedException
clearAsync()
. Calls clearAsync()
and waits for the returned PgxFuture
to complete.InterruptedException
- if the caller thread gets interrupted while waiting for completion.ExecutionException
- if any exception occurred during asynchronous execution. The actual exception will be nested.public PgxCollection<E,ID> clone()
public PgxCollection<E,ID> clone(String newName) throws InterruptedException, ExecutionException
public PgxFuture<PgxCollection<E,ID>> cloneAsync()
cloneAsync(String)
passing name as null
public PgxFuture<PgxCollection<E,ID>> cloneAsync(String newName)
newName
- name of the new collectionpublic CollectionType getCollectionType()
public EntityType getElementType()
public PgxGraph getGraph()
public String getName()
getName
in class PgxManagedObject
@Generated(value="src/python/synchronize.py") public Iterator<E> iterator()
iteratorAsync()
. Calls iteratorAsync()
and waits for the returned PgxFuture
to complete.iterator
in interface Iterable<E extends PgxEntity<ID>>
InterruptedException
- if the caller thread gets interrupted while waiting for completion.ExecutionException
- if any exception occurred during asynchronous execution. The actual exception will be nested.public PgxFuture<Iterator<E>> iteratorAsync()
@Generated(value="src/python/synchronize.py") public void removeAll(Collection<E> source) throws ExecutionException, InterruptedException
#removeAllAsync()
. Calls #removeAllAsync()
and waits for the returned PgxFuture
to complete.InterruptedException
- if the caller thread gets interrupted while waiting for completion.ExecutionException
- if any exception occurred during asynchronous execution. The actual exception will be nested.public abstract void removeAll(ID... ids) throws ExecutionException, InterruptedException
public PgxFuture<Void> removeAllAsync(Collection<E> source)
source
- vertices/edges to remove@Generated(value="src/python/synchronize.py") public int size() throws ExecutionException, InterruptedException
sizeAsync()
. Calls sizeAsync()
and waits for the returned PgxFuture
to complete.InterruptedException
- if the caller thread gets interrupted while waiting for completion.ExecutionException
- if any exception occurred during asynchronous execution. The actual exception will be nested.public PgxFuture<Integer> sizeAsync()
public String toString()
toString
in class PgxManagedObject
Copyright © 2015. All rights reserved.