use of org.neo4j.kernel.impl.nioneo.store.PropertyIndexStore in project neo4j-mobile-android by neo4j-contrib.
the class ReadTransaction method loadIndex.
@Override
public String loadIndex(int id) {
PropertyIndexStore indexStore = getPropertyStore().getIndexStore();
PropertyIndexRecord index = indexStore.getRecord(id);
if (index.isLight()) {
indexStore.makeHeavy(index);
}
return indexStore.getStringFor(index);
}
use of org.neo4j.kernel.impl.nioneo.store.PropertyIndexStore in project graphdb by neo4j-attic.
the class BatchInserterImpl method createNewPropertyIndex.
private int createNewPropertyIndex(String stringKey) {
PropertyIndexStore idxStore = getPropertyIndexStore();
int keyId = (int) idxStore.nextId();
PropertyIndexRecord record = new PropertyIndexRecord(keyId);
record.setInUse(true);
record.setCreated();
int keyBlockId = idxStore.nextKeyBlockId();
record.setKeyBlockId(keyBlockId);
int length = stringKey.length();
char[] chars = new char[length];
stringKey.getChars(0, length, chars, 0);
Collection<DynamicRecord> keyRecords = idxStore.allocateKeyRecords(keyBlockId, chars);
for (DynamicRecord keyRecord : keyRecords) {
record.addKeyRecord(keyRecord);
}
idxStore.updateRecord(record);
indexHolder.addPropertyIndex(stringKey, keyId);
return keyId;
}
use of org.neo4j.kernel.impl.nioneo.store.PropertyIndexStore in project graphdb by neo4j-attic.
the class ReadTransaction method getPropertyIndex.
String getPropertyIndex(int id) {
PropertyIndexStore indexStore = getPropertyStore().getIndexStore();
PropertyIndexRecord index = indexStore.getRecord(id);
if (index.isLight()) {
indexStore.makeHeavy(index);
}
return indexStore.getStringFor(index);
}
Aggregations