Class TinkerMemory
- java.lang.Object
-
- org.apache.tinkerpop.gremlin.tinkergraph.process.computer.TinkerMemory
-
- All Implemented Interfaces:
Memory
,Memory.Admin
public final class TinkerMemory extends Object implements Memory.Admin
- Author:
- Marko A. Rodriguez (http://markorodriguez.com)
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.tinkerpop.gremlin.process.computer.Memory
Memory.Admin, Memory.Exceptions
-
-
Field Summary
Fields Modifier and Type Field Description Map<String,Optional<Object>>
currentMap
Map<String,MemoryComputeKey>
memoryKeys
Map<String,Optional<Object>>
previousMap
-
Constructor Summary
Constructors Constructor Description TinkerMemory(VertexProgram<?> vertexProgram, Set<MapReduce> mapReducers)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(String key, Object value)
protected void
checkKeyValue(String key, Object value)
protected void
complete()
protected void
completeSubRound()
<R> R
get(String key)
int
getIteration()
long
getRuntime()
void
incrIteration()
boolean
isInitialIteration()
Set<String>
keys()
void
set(String key, Object value)
void
setIteration(int iteration)
void
setRuntime(long runTime)
String
toString()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.tinkerpop.gremlin.process.computer.Memory.Admin
asImmutable
-
-
-
-
Constructor Detail
-
TinkerMemory
public TinkerMemory(VertexProgram<?> vertexProgram, Set<MapReduce> mapReducers)
-
-
Method Detail
-
incrIteration
public void incrIteration()
- Specified by:
incrIteration
in interfaceMemory.Admin
-
setIteration
public void setIteration(int iteration)
- Specified by:
setIteration
in interfaceMemory.Admin
-
getIteration
public int getIteration()
- Specified by:
getIteration
in interfaceMemory
-
setRuntime
public void setRuntime(long runTime)
- Specified by:
setRuntime
in interfaceMemory.Admin
-
getRuntime
public long getRuntime()
- Specified by:
getRuntime
in interfaceMemory
-
complete
protected void complete()
-
completeSubRound
protected void completeSubRound()
-
isInitialIteration
public boolean isInitialIteration()
- Specified by:
isInitialIteration
in interfaceMemory
-
get
public <R> R get(String key) throws IllegalArgumentException
- Specified by:
get
in interfaceMemory
- Throws:
IllegalArgumentException
-
-