test_class.declarator: builderProvider = new DocumentMKBuilderProvider()
test_class.modifier: @Rule
      public
test_class.original_string: @Rule
      public DocumentMKBuilderProvider builderProvider = new DocumentMKBuilderProvider();
test_class.type: DocumentMKBuilderProvider
test_class.var_name: builderProvider
test_class.declarator: clock
test_class.modifier: private
test_class.original_string: private Clock clock;
test_class.type: Clock
test_class.var_name: clock
test_class.declarator: store
test_class.modifier: private
test_class.original_string: private DocumentNodeStore store;
test_class.type: DocumentNodeStore
test_class.var_name: store
test_class.file: oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/CheckpointsTest.java
test_class.identifier: CheckpointsTest
test_case.body: @Test
      public void crossClusterCheckpointNewClusterNode() throws Exception {
          DocumentStore store = new MemoryDocumentStore();
          DocumentNodeStore ns1 = builderProvider.newBuilder().setClusterId(1)
                  .setDocumentStore(store).setAsyncDelay(0).getNodeStore();
  
          // create 'foo' on ns1
          NodeBuilder b1 = ns1.getRoot().builder();
          b1.child("foo");
          ns1.merge(b1, EmptyHook.INSTANCE, CommitInfo.EMPTY);
  
          // checkpoint sees 'foo' but not 'bar'
          String checkpoint = ns1.checkpoint(Long.MAX_VALUE);
  
          // create 'bar' on ns1
          b1 = ns1.getRoot().builder();
          b1.child("bar");
          ns1.merge(b1, EmptyHook.INSTANCE, CommitInfo.EMPTY);
  
          // make visible
          ns1.runBackgroundOperations();
  
          // now start second node store
          DocumentNodeStore ns2 = builderProvider.newBuilder().setClusterId(2)
                  .setDocumentStore(store).setAsyncDelay(0).getNodeStore();
          NodeBuilder b2 = ns2.getRoot().builder();
          b2.child("baz");
          ns2.merge(b2, EmptyHook.INSTANCE, CommitInfo.EMPTY);
  
          NodeState root = ns2.retrieve(checkpoint);
          assertNotNull(root);
          assertTrue(root.hasChildNode("foo"));
          assertFalse(root.hasChildNode("bar"));
          assertFalse(root.hasChildNode("baz"));
      }
test_case.class_method_signature: CheckpointsTest.crossClusterCheckpointNewClusterNode()
test_case.full_signature: @Test public void crossClusterCheckpointNewClusterNode()
test_case.identifier: crossClusterCheckpointNewClusterNode
test_case.invocations: getNodeStore setAsyncDelay setDocumentStore setClusterId newBuilder builder getRoot child merge checkpoint builder getRoot child merge runBackgroundOperations getNodeStore setAsyncDelay setDocumentStore setClusterId newBuilder builder getRoot child merge retrieve assertNotNull assertTrue hasChildNode assertFalse hasChildNode assertFalse hasChildNode
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void crossClusterCheckpointNewClusterNode()
focal_class.declarator: LOG = LoggerFactory.getLogger(Checkpoints.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger LOG = LoggerFactory.getLogger(Checkpoints.class);
focal_class.type: Logger
focal_class.var_name: LOG
focal_class.declarator: ID = "checkpoint"
focal_class.modifier: private static final
focal_class.original_string: private static final String ID = "checkpoint";
focal_class.type: String
focal_class.var_name: ID
focal_class.declarator: PROP_CHECKPOINT = "data"
focal_class.modifier: private static final
focal_class.original_string: private static final String PROP_CHECKPOINT = "data";
focal_class.type: String
focal_class.var_name: PROP_CHECKPOINT
focal_class.declarator: CLEANUP_INTERVAL = 100
focal_class.modifier: static final
focal_class.original_string: static final int CLEANUP_INTERVAL = 100;
focal_class.type: int
focal_class.var_name: CLEANUP_INTERVAL
focal_class.declarator: nodeStore
focal_class.modifier: private final
focal_class.original_string: private final DocumentNodeStore nodeStore;
focal_class.type: DocumentNodeStore
focal_class.var_name: nodeStore
focal_class.declarator: store
focal_class.modifier: private final
focal_class.original_string: private final DocumentStore store;
focal_class.type: DocumentStore
focal_class.var_name: store
focal_class.declarator: log = LoggerFactory.getLogger(getClass())
focal_class.modifier: private final
focal_class.original_string: private final Logger log = LoggerFactory.getLogger(getClass());
focal_class.type: Logger
focal_class.var_name: log
focal_class.declarator: createCounter = new AtomicInteger()
focal_class.modifier: private final
focal_class.original_string: private final AtomicInteger createCounter = new AtomicInteger();
focal_class.type: AtomicInteger
focal_class.var_name: createCounter
focal_class.declarator: cleanupLock = new Object()
focal_class.modifier: private final
focal_class.original_string: private final Object cleanupLock = new Object();
focal_class.type: Object
focal_class.var_name: cleanupLock
focal_class.file: oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/Checkpoints.java
focal_class.identifier: Checkpoints
focal_class.class_method_signature: Checkpoints.Checkpoints(DocumentNodeStore store)
focal_class.full_signature:   Checkpoints(DocumentNodeStore store)
focal_class.identifier: Checkpoints
focal_class.parameters: (DocumentNodeStore store)
focal_class.signature:  Checkpoints(DocumentNodeStore store)
focal_class.class_method_signature: Checkpoints.create(long lifetimeInMillis, Map<String, String> info)
focal_class.full_signature: public Revision create(long lifetimeInMillis, Map<String, String> info)
focal_class.identifier: create
focal_class.modifiers: public
focal_class.parameters: (long lifetimeInMillis, Map<String, String> info)
focal_class.return: Revision
focal_class.signature: Revision create(long lifetimeInMillis, Map<String, String> info)
focal_class.class_method_signature: Checkpoints.release(String checkpoint)
focal_class.full_signature: public void release(String checkpoint)
focal_class.identifier: release
focal_class.modifiers: public
focal_class.parameters: (String checkpoint)
focal_class.return: void
focal_class.signature: void release(String checkpoint)
focal_class.class_method_signature: Checkpoints.getOldestRevisionToKeep()
focal_class.full_signature: @SuppressWarnings("unchecked") @Nullable public Revision getOldestRevisionToKeep()
focal_class.identifier: getOldestRevisionToKeep
focal_class.modifiers: @SuppressWarnings("unchecked") @Nullable public
focal_class.parameters: ()
focal_class.return: Revision
focal_class.signature: Revision getOldestRevisionToKeep()
focal_class.class_method_signature: Checkpoints.getCheckpoints()
focal_class.full_signature: @SuppressWarnings("unchecked") @NotNull SortedMap<Revision, Info> getCheckpoints()
focal_class.identifier: getCheckpoints
focal_class.modifiers: @SuppressWarnings("unchecked") @NotNull
focal_class.parameters: ()
focal_class.return: SortedMap<Revision, Info>
focal_class.signature: SortedMap<Revision, Info> getCheckpoints()
focal_class.class_method_signature: Checkpoints.retrieve(@NotNull String checkpoint)
focal_class.full_signature: @Nullable RevisionVector retrieve(@NotNull String checkpoint)
focal_class.identifier: retrieve
focal_class.modifiers: @Nullable
focal_class.parameters: (@NotNull String checkpoint)
focal_class.return: RevisionVector
focal_class.signature: RevisionVector retrieve(@NotNull String checkpoint)
focal_class.class_method_signature: Checkpoints.setInfoProperty(@NotNull String checkpoint, @NotNull String key, @Nullable String value)
focal_class.full_signature:  void setInfoProperty(@NotNull String checkpoint, @NotNull String key, @Nullable String value)
focal_class.identifier: setInfoProperty
focal_class.parameters: (@NotNull String checkpoint, @NotNull String key, @Nullable String value)
focal_class.return: void
focal_class.signature: void setInfoProperty(@NotNull String checkpoint, @NotNull String key, @Nullable String value)
focal_class.class_method_signature: Checkpoints.size()
focal_class.full_signature:  int size()
focal_class.identifier: size
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int size()
focal_class.class_method_signature: Checkpoints.performCleanupIfRequired()
focal_class.full_signature: private void performCleanupIfRequired()
focal_class.identifier: performCleanupIfRequired
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void performCleanupIfRequired()
focal_class.class_method_signature: Checkpoints.createIfNotExist()
focal_class.full_signature: private void createIfNotExist()
focal_class.identifier: createIfNotExist
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void createIfNotExist()
focal_class.class_method_signature: Checkpoints.expand(Revision checkpoint)
focal_class.full_signature: private RevisionVector expand(Revision checkpoint)
focal_class.identifier: expand
focal_class.modifiers: private
focal_class.parameters: (Revision checkpoint)
focal_class.return: RevisionVector
focal_class.signature: RevisionVector expand(Revision checkpoint)
focal_method.body: @Nullable
      RevisionVector retrieve(@NotNull String checkpoint)
              throws IllegalArgumentException {
          Revision r;
          try {
              r = Revision.fromString(checkNotNull(checkpoint));
          } catch (IllegalArgumentException e) {
              LOG.warn("Malformed checkpoint reference: {}", checkpoint);
              return null;
          }
          Info info = getCheckpoints().get(r);
          if (info == null) {
              return null;
          }
          RevisionVector rv = info.getCheckpoint();
          if (rv == null) {
              rv = expand(r);
          }
          return rv;
      }
focal_method.class_method_signature: Checkpoints.retrieve(@NotNull String checkpoint)
focal_method.full_signature: @Nullable RevisionVector retrieve(@NotNull String checkpoint)
focal_method.identifier: retrieve
focal_method.invocations: fromString checkNotNull warn get getCheckpoints getCheckpoint expand
focal_method.modifiers: @Nullable
focal_method.parameters: (@NotNull String checkpoint)
focal_method.return: RevisionVector
focal_method.signature: RevisionVector retrieve(@NotNull String checkpoint)