Package org.lab41.dendrite.metagraph

Examples of org.lab41.dendrite.metagraph.MetaGraphTx.commit()


        } catch (Throwable t) {
            tx.rollback();
            throw t;
        }

        tx.commit();

        return authenticated;
    }

    @Override
View Full Code Here


                dendriteGraphTx.commit();
            }

            return new ResponseEntity<>(response, HttpStatus.OK);
        } finally {
            tx.commit();
        }
    }

    private void addVertex(Map<Object, Object> verticesMap, Vertex vertex) {
        if (!verticesMap.containsKey(vertex.getId())) {
View Full Code Here

            response.put("msg", "deleted");

            return new ResponseEntity<>(response, HttpStatus.OK);
        } finally {
            tx.commit();
        }
    }

    @PreAuthorize("hasPermission(#projectId, 'project', 'admin')")
    @RequestMapping(value = "/projects/{projectId}/graphs", method = RequestMethod.GET)
View Full Code Here

                graphs.add(new GetGraphResponse(graphMetadata));
            }

            return new GetGraphsResponse(graphs);
        } finally {
            tx.commit();
        }
    }

    @PreAuthorize("hasPermission(#projectId, 'project', 'admin')")
    @RequestMapping(value = "/projects/{projectId}/graphs", method = RequestMethod.POST)
View Full Code Here

        } catch (Throwable t) {
            tx.rollback();
            throw t;
        }

        tx.commit();

        return new ResponseEntity<>(getGraphResponse, headers, HttpStatus.CREATED);
    }

    @PreAuthorize("hasPermission(#projectId, 'project', 'admin')")
View Full Code Here

            // FIXME: Temporary hack to force loading the graph until the UI can handle it occurring asynchronously.
            metaGraphService.getDendriteGraph(graphMetadata.getId());

            return new GetGraphResponse(graphMetadata);
        } finally {
            tx.commit();
        }
    }
}
View Full Code Here

            // Update the branch to point the new graph.
            MetaGraphTx tx = metaGraph.newTransaction();
            try {
                BranchMetadata branchMetadata = tx.getBranch(branchId);
                branchMetadata.setGraph(tx.getGraph(dstGraph.getId()));
                tx.commit();
            } catch (Throwable t) {
                tx.rollback();
                throw t;
            }
View Full Code Here

                    JobMetadata childJobMetadata = tx.createJob(jobMetadata);
                    childJobMetadata.setName("faunusHadoopJob");
                    childJobMetadata.setState(JobMetadata.DONE);
                    childJobMetadata.setProgress(1.0f);
                    childJobMetadata.setMapreduceJobId(hadoopJobId.toString());
                    tx.commit();

                    jobMap.put(hadoopJobId, childJobMetadata.getId());
                }
            }
        }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.