use of org.neo4j.exceptions.StoreFailureException in project neo4j by neo4j.
the class NodeEntityWrappingNodeValue method labels.
@Override
public TextArray labels() {
TextArray l = labels;
if (l == null) {
try {
synchronized (this) {
l = labels;
if (l == null) {
List<String> ls = new ArrayList<>();
for (Label label : node.getLabels()) {
ls.add(label.name());
}
l = labels = Values.stringArray(ls.toArray(new String[0]));
}
}
} catch (NotFoundException | IllegalStateException | StoreFailureException e) {
throw new ReadAndDeleteTransactionConflictException(NodeEntity.isDeletedInCurrentTransaction(node), e);
}
}
return l;
}
use of org.neo4j.exceptions.StoreFailureException in project neo4j by neo4j.
the class NodeEntityWrappingNodeValue method properties.
public MapValue properties(NodeCursor nodeCursor, PropertyCursor propertyCursor) {
MapValue m = properties;
if (m == null) {
try {
synchronized (this) {
m = properties;
if (m == null) {
// No DBHits for Virtual node hacks.
var nodeProperties = node instanceof NodeEntity ? ((NodeEntity) node).getAllProperties(nodeCursor, propertyCursor) : node.getAllProperties();
m = properties = ValueUtils.asMapValue(nodeProperties);
}
}
} catch (NotFoundException | IllegalStateException | StoreFailureException e) {
throw new ReadAndDeleteTransactionConflictException(NodeEntity.isDeletedInCurrentTransaction(node), e);
}
}
return m;
}
use of org.neo4j.exceptions.StoreFailureException in project neo4j by neo4j.
the class NodeEntityWrappingNodeValue method labels.
public TextArray labels(NodeCursor nodeCursor) {
TextArray l = labels;
if (l == null) {
try {
synchronized (this) {
l = labels;
if (l == null) {
List<String> ls = new ArrayList<>();
// No DBHits for Virtual node hacks.
var nodeLabels = node instanceof NodeEntity ? ((NodeEntity) node).getLabels(nodeCursor) : node.getLabels();
for (Label label : nodeLabels) {
ls.add(label.name());
}
l = labels = Values.stringArray(ls.toArray(new String[0]));
}
}
} catch (NotFoundException | IllegalStateException | StoreFailureException e) {
throw new ReadAndDeleteTransactionConflictException(NodeEntity.isDeletedInCurrentTransaction(node), e);
}
}
return l;
}
Aggregations