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()
Requests destruction of this object.
|
VertexProperty<ID,java.lang.Long> |
getComponentsProperty()
Returns the property that contains for each vertex, its associated component ID
|
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
public PgxFuture<java.lang.Void> destroyAsync()
Destroyable
destroyAsync
in class Destroyable
public VertexProperty<ID,java.lang.Long> getComponentsProperty()
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