Index: oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/segment/SegmentNodeStore.java
===================================================================
--- oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/segment/SegmentNodeStore.java	(revision 1547398)
+++ oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/segment/SegmentNodeStore.java	(working copy)
@@ -51,6 +51,8 @@
 
     static final String ROOT = "root";
 
+    static final String CHECKPOINT = "checkpoint";
+
     private final SegmentStore store;
 
     private final Journal journal;
@@ -178,17 +180,32 @@
     @Override @Nonnull
     public synchronized String checkpoint(long lifetime) {
         checkArgument(lifetime > 0);
-        // TODO: Guard the checkpoint from garbage collection
-        return head.getRecordId().toString();
+        String name = SegmentIdFactory.newDataSegmentId().toString();
+
+        refreshHead();
+
+        SegmentNodeState ns = head;
+        RecordId ri = head.getRecordId();
+
+        SegmentRootBuilder builder = ns.builder();
+        NodeBuilder cp = builder.child(CHECKPOINT).setChildNode(name,
+                ns.getChildNode(ROOT));
+        cp.setProperty("lifetime", System.currentTimeMillis() + lifetime);
+        journal.setHead(ri, builder.getNodeState().getRecordId());
+
+        // TODO should I go through the #commitSemaphore?
+        refreshHead();
+
+        return name;
     }
 
     @Override @CheckForNull
     public synchronized NodeState retrieve(@Nonnull String checkpoint) {
-        // TODO: Verify validity of the checkpoint
-        RecordId id = RecordId.fromString(checkNotNull(checkpoint));
-        SegmentNodeState root =
-                new SegmentNodeState(store.getWriter().getDummySegment(), id);
-        return root.getChildNode(ROOT);
+        NodeState cp = head.getChildNode(CHECKPOINT).getChildNode(checkpoint);
+        if (cp.exists()) {
+            return cp;
+        }
+        return null;
     }
 
     private class Commit {
Index: oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/segment/CheckpointTest.java
===================================================================
--- oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/segment/CheckpointTest.java	(revision 0)
+++ oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/segment/CheckpointTest.java	(revision 0)
@@ -0,0 +1,81 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jackrabbit.oak.plugins.segment;
+
+import static junit.framework.Assert.assertFalse;
+import static junit.framework.Assert.assertNotNull;
+import static junit.framework.Assert.assertTrue;
+
+import java.util.concurrent.TimeUnit;
+
+import org.apache.jackrabbit.oak.api.CommitFailedException;
+import org.apache.jackrabbit.oak.plugins.segment.memory.MemoryStore;
+import org.apache.jackrabbit.oak.spi.commit.EmptyHook;
+import org.apache.jackrabbit.oak.spi.state.NodeBuilder;
+import org.apache.jackrabbit.oak.spi.state.NodeState;
+import org.apache.jackrabbit.oak.spi.state.NodeStore;
+import org.junit.Test;
+
+public class CheckpointTest {
+
+    @Test
+    public void testCheckpoint() throws CommitFailedException {
+        SegmentNodeStore store = new SegmentNodeStore(new MemoryStore());
+        addTestNode(store, "test-checkpoint");
+        verifyNS(store, true);
+        rmTestNode(store, "test-checkpoint");
+        verifyNS(store, false);
+
+        // gc?
+        store.retrieve(SegmentIdFactory.newDataSegmentId().toString());
+    }
+
+    private static void verifyNS(SegmentNodeStore store, boolean exists) {
+        String cp = store.checkpoint(TimeUnit.HOURS.toMillis(1));
+        assertNotNull("Checkpoint must not be null", cp);
+
+        NodeState root = store.head;
+        assertTrue("Checkpoint doesn't exist",
+                root.getChildNode(SegmentNodeStore.CHECKPOINT).getChildNode(cp)
+                        .exists());
+
+        NodeState cpns = store.retrieve(cp);
+        assertNotNull(cpns);
+        if (exists) {
+            assertTrue("Node doesn't exist in checkpoint",
+                    cpns.getChildNode("test-checkpoint").exists());
+        } else {
+            assertFalse("Node shouldn't exist in checkpoint", cpns
+                    .getChildNode("test-checkpoint").exists());
+        }
+    }
+
+    private static void addTestNode(NodeStore store, String name)
+            throws CommitFailedException {
+        NodeBuilder builder = store.getRoot().builder();
+        builder.child(name);
+        store.merge(builder, EmptyHook.INSTANCE, null);
+    }
+
+    private static void rmTestNode(NodeStore store, String name)
+            throws CommitFailedException {
+        NodeBuilder builder = store.getRoot().builder();
+        builder.child(name).remove();
+        store.merge(builder, EmptyHook.INSTANCE, null);
+    }
+
+}
