With Gremlin you can pass indices for ranges:
// for the second ten links
g.v(1).outE.has('time',T.gte, fiveDaysAgoInMs)[10..19]
// for the previous ten links
g.v(1).outE.has('time',T.gte, fiveDaysAgoInMs)[0..9]
// for the next ten links
g.v(1).outE.has('time',T.gte, fiveDaysAgoInMs)[20..29]
// for one link only
g.v(1).outE.has('time',T.gte, fiveDaysAgoInMs)[0..<1]
Source: GremlinDocs
In Java code:
Graph g = ... // a reference to a Blueprints graph
GremlinePipeline pipe = new GremlinPipeline();
Long DAY_IN_MS = 1000 * 60 * 60 * 24;
// first 10
pipe.start(g.getVertex(1)).outE().has("time", Tokens.gte, new Date(date.getTime() - (5 * DAY_IN_MS))).range(0, 10));
// if you want next 10
pipe.next(10);
Source: GremlinPipeline, Using Gremlin though Java