ID
- the ID type of the verticespublic class Partition<ID> extends Destroyable implements java.lang.Iterable<VertexCollection<ID>>
Modifier and Type | Method and Description |
---|---|
PgxFuture<java.lang.Void> |
destroyAsync(boolean ignoreNotFound) |
PgxGraph |
getGraph()
Gets the graph.
|
VertexCollection<ID> |
getPartitionByIndex(long index)
Gets a partition by index.
|
VertexCollection<ID> |
getPartitionByVertex(PgxVertex<ID> vertex)
Gets the partition a particular vertex belongs to.
|
long |
getPartitionIndexOfVertex(PgxVertex<ID> vertex)
Gets the index of the partition a particular vertex belongs to.
|
java.util.Iterator<VertexCollection<ID>> |
iterator()
Creates an iterator over all partitions.
|
long |
size()
Gets the size of this partition.
|
java.lang.String |
toString() |
close, destroy, destroyAsync
public PgxFuture<java.lang.Void> destroyAsync(boolean ignoreNotFound)
ignoreNotFound
- if true, do not treat the absence of this object on the server-side as an error case.public PgxGraph getGraph()
public VertexCollection<ID> getPartitionByIndex(long index)
index
- the index. Must be between 0 and size()
- 1.public VertexCollection<ID> getPartitionByVertex(PgxVertex<ID> vertex)
vertex
- the vertexpublic long getPartitionIndexOfVertex(PgxVertex<ID> vertex)
vertex
- the vertexsize()
- 1.public java.util.Iterator<VertexCollection<ID>> iterator()
iterator
in interface java.lang.Iterable<VertexCollection<ID>>
public long size()
public java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2017 Oracle Corp. All Rights Reserved.