use of org.neo4j.kernel.impl.store.RecordStore in project neo4j by neo4j.
the class RsdrMain method read.
private static void read(FileSystemAbstraction fileSystem, String cmd, NeoStores neoStores) throws IOException {
Matcher matcher = readCommandPattern.matcher(cmd);
if (matcher.find()) {
String lower = matcher.group("lower");
String upper = matcher.group("upper");
String fname = matcher.group("fname");
String regex = matcher.group("regex");
Pattern pattern = regex != null ? Pattern.compile(regex) : null;
long fromId = lower != null ? Long.parseLong(lower) : 0L;
long toId = upper != null ? Long.parseLong(upper) : Long.MAX_VALUE;
RecordStore store = getStore(fname, neoStores);
if (store != null) {
readStore(fileSystem, store, fromId, toId, pattern);
return;
}
IOCursor<LogEntry> cursor = getLogCursor(fileSystem, fname, neoStores);
if (cursor != null) {
readLog(cursor, fromId, toId, pattern);
cursor.close();
return;
}
console.printf("don't know how to read '%s'%n", fname);
} else {
console.printf("bad read command format%n");
}
}
Aggregations