use of org.neo4j.kernel.impl.nioneo.store.PropertyIndexStore in project graphdb by neo4j-attic.
the class WriteTransaction method getPropertyIndex.
String getPropertyIndex(int id) {
PropertyIndexStore indexStore = getPropertyStore().getIndexStore();
PropertyIndexRecord index = getPropertyIndexRecord(id);
if (index == null) {
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 WriteTransaction method createPropertyIndex.
void createPropertyIndex(int id, String key) {
PropertyIndexRecord record = new PropertyIndexRecord(id);
record.setInUse(true);
record.setCreated();
PropertyIndexStore propIndexStore = getPropertyStore().getIndexStore();
int keyBlockId = propIndexStore.nextKeyBlockId();
record.setKeyBlockId(keyBlockId);
int length = key.length();
char[] chars = new char[length];
key.getChars(0, length, chars, 0);
Collection<DynamicRecord> keyRecords = propIndexStore.allocateKeyRecords(keyBlockId, chars);
for (DynamicRecord keyRecord : keyRecords) {
record.addKeyRecord(keyRecord);
}
addPropertyIndexRecord(record);
}
use of org.neo4j.kernel.impl.nioneo.store.PropertyIndexStore in project neo4j-mobile-android by neo4j-contrib.
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);
Collection<DynamicRecord> keyRecords = idxStore.allocateKeyRecords(keyBlockId, encodeString(stringKey));
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 neo4j-mobile-android by neo4j-contrib.
the class WriteTransaction method createPropertyIndex.
@Override
public void createPropertyIndex(String key, int id) {
PropertyIndexRecord record = new PropertyIndexRecord(id);
record.setInUse(true);
record.setCreated();
PropertyIndexStore propIndexStore = getPropertyStore().getIndexStore();
int keyBlockId = propIndexStore.nextKeyBlockId();
record.setKeyBlockId(keyBlockId);
Collection<DynamicRecord> keyRecords = propIndexStore.allocateKeyRecords(keyBlockId, encodeString(key));
for (DynamicRecord keyRecord : keyRecords) {
record.addKeyRecord(keyRecord);
}
addPropertyIndexRecord(record);
}
use of org.neo4j.kernel.impl.nioneo.store.PropertyIndexStore in project neo4j-mobile-android by neo4j-contrib.
the class WriteTransaction method loadIndex.
@Override
public String loadIndex(int id) {
PropertyIndexStore indexStore = getPropertyStore().getIndexStore();
PropertyIndexRecord index = getPropertyIndexRecord(id);
if (index == null) {
index = indexStore.getRecord(id);
}
if (index.isLight()) {
indexStore.makeHeavy(index);
}
return indexStore.getStringFor(index);
}
Aggregations