| … | … | @@ -101,6 +101,8 @@ void StorageNode::setValue(const Handle& key, const ValuePtr& value) |
| 101 | 101 | // branching, instead of string compare. |
| 102 | 102 | static constexpr uint32_t p_open = |
| 103 | 103 | dispatch_hash("*-open-*"); |
| 104 | static constexpr uint32_t p_open_ro = |
| 105 | dispatch_hash("*-open-ro-*"); |
| 104 | 106 | static constexpr uint32_t p_close = |
| 105 | 107 | dispatch_hash("*-close-*"); |
| 106 | 108 | |
| … | … | @@ -168,6 +170,14 @@ void StorageNode::setValue(const Handle& key, const ValuePtr& value) |
| 168 | 170 | open(); |
| 169 | 171 | return; |
| 170 | 172 | } |
| 173 | case p_open_ro: { |
| 174 | COLL("*-open-ro-*"); |
| 175 | AtomSpace* as = get_target_as(value); |
| 176 | if (nullptr == as) as = getAtomSpace(); |
| 177 | _target_as = as; |
| 178 | open_read_only(); |
| 179 | return; |
| 180 | } |
| 171 | 181 | case p_close: |
| 172 | 182 | COLL("*-close-*"); |
| 173 | 183 | close(); |
| … | … | @@ -539,6 +549,12 @@ void StorageNode::proxy_close(void) |
| 539 | 549 | "This StorageNode does not implement proxying!"); |
| 540 | 550 | } |
| 541 | 551 | |
| 552 | void StorageNode::open_read_only(void) |
| 553 | { |
| 554 | throw RuntimeException(TRACE_INFO, |
| 555 | "This StorageNode does not support read-only opening!"); |
| 556 | } |
| 557 | |
| 542 | 558 | void StorageNode::set_proxy(const Handle&) |
| 543 | 559 | { |
| 544 | 560 | throw RuntimeException(TRACE_INFO, |