@Deprecated public class GraphState extends Object implements GraphStep.Callback
GraphSpec itself. All ids of the intended
actions will be collected in a preliminary phase. This is necessary since
intermediate actions may disconnect the graph, causing later actions to fail
if they were solely based on the id of the root element.
The GraphState instance can only be initialized with a graph of
initialized s.
To handle SOFT requirements, each new attempt to process either a node or a
leaf in the subgraph is surrounded by a savepoint. Ids added during a
savepoint (or a sub-savepoint) are only valid until release is called, at
which time they are merged into the final view.| Constructor and Description |
|---|
GraphState(EventContext ec,
GraphStepFactory factory,
ome.util.SqlAction sql,
org.hibernate.Session session,
GraphSpec spec)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add()
Deprecated.
|
void |
addGraphIds(GraphStep step)
Deprecated.
Add the actually processed ids to the current savepoint.
|
int |
collapse(boolean keep)
Deprecated.
|
Iterable<Map.Entry<String,Set<Long>>> |
entrySet()
Deprecated.
|
String |
execute(int j)
Deprecated.
|
Class<ome.model.IObject> |
getClass(String key)
Deprecated.
|
GraphOpts |
getOpts()
Deprecated.
|
Set<Long> |
getProcessedIds(String table)
Deprecated.
Get the set of ids which were actually processed.
|
GraphStep |
getStep(int i)
Deprecated.
|
int |
getTotalFoundCount()
Deprecated.
Return the total number of ids loaded into this instance.
|
int |
getTotalProcessedCount()
Deprecated.
Return the total number of ids which were processed.
|
String |
perform(int j,
boolean validate)
Deprecated.
|
void |
release(String savepoint,
int count)
Deprecated.
|
void |
rollback(String savepoint,
int count)
Deprecated.
|
void |
savepoint(String savepoint)
Deprecated.
|
int |
size()
Deprecated.
|
String |
toString()
Deprecated.
|
String |
validate(int j)
Deprecated.
|
int |
validation()
Deprecated.
Prepares the next phase (
validate(int)) by returning how
many validation steps should be performed. |
public GraphState(EventContext ec, GraphStepFactory factory, ome.util.SqlAction sql, org.hibernate.Session session, GraphSpec spec) throws GraphException
Base - EventContext instance which will be used to create a
special EventContext based on the current graph. This second
instance will be passed to each created step via
GraphSpec#setEventContext(EventContext).ctx - Stored the OmeroContext instance for raising event
during #release(String)session - non-null, active Hibernate session that will be used to process
all necessary items as well as lookup items for processing.GraphExceptionpublic int getTotalFoundCount()
public GraphStep getStep(int i)
public GraphOpts getOpts()
public int getTotalProcessedCount()
public Set<Long> getProcessedIds(String table)
#addAll(String, Class, List)public void addGraphIds(GraphStep step)
addGraphIds in interface GraphStep.CallbackGraphException - thrown if the EventLogMessage raised fails.public String execute(int j) throws GraphException
step - which step is to be invoked. Running a step multiple times is
not supported.GraphException - Any errors which were caused during execution. Which
execution states may be encountered is strongly tied to the
definition of the specification and to the options which are
passed in during initialization.public int validation()
validate(int)) by returning how
many validation steps should be performed.public String validate(int j) throws GraphException
step - which step is to be invoked. Running a step multiple times is
not supported.GraphException - Any errors which were caused during execution. Which
execution states may be encountered is strongly tied to the
definition of the specification and to the options which are
passed in during initialization.public String perform(int j, boolean validate) throws GraphException
validate - after the proper execution of all steps has taken place,
a validation call is made.GraphExceptionpublic Class<ome.model.IObject> getClass(String key)
getClass in interface GraphStep.Callbackpublic void add()
add in interface GraphStep.Callbackpublic int size()
size in interface GraphStep.Callbackpublic Iterable<Map.Entry<String,Set<Long>>> entrySet()
entrySet in interface GraphStep.Callbackpublic int collapse(boolean keep)
collapse in interface GraphStep.Callbackpublic void savepoint(String savepoint)
savepoint in interface GraphStep.Callbackpublic void release(String savepoint, int count) throws GraphException
release in interface GraphStep.CallbackGraphExceptionpublic void rollback(String savepoint, int count) throws GraphException
rollback in interface GraphStep.CallbackGraphException
Version: 5.1.1-ice35-b43
Copyright © 2015 The University of Dundee & Open Microscopy Environment. All Rights Reserved.