1 package org.modeshape.repository.sequencer;
2
3 import net.jcip.annotations.NotThreadSafe;
4 import org.modeshape.graph.ExecutionContext;
5 import org.modeshape.graph.Graph;
6 import org.modeshape.graph.io.Destination;
7 import org.modeshape.graph.io.GraphBatchDestination;
8
9
10
11
12
13
14
15
16
17
18 @NotThreadSafe
19 public class SequencerContext {
20
21 private final ExecutionContext executionContext;
22 private final Graph graph;
23 private final Destination destination;
24
25 public SequencerContext( ExecutionContext executionContext,
26 Graph graph ) {
27 super();
28
29 assert executionContext != null;
30 assert graph != null;
31
32 this.executionContext = executionContext;
33 this.graph = graph;
34 this.destination = new GraphBatchDestination(graph.batch());
35 }
36
37
38
39
40
41 public ExecutionContext getExecutionContext() {
42 return executionContext;
43 }
44
45
46
47
48
49 public Destination getDestination() {
50 return destination;
51 }
52
53 Graph graph() {
54 return this.graph;
55 }
56
57 }