public abstract class View extends AbstractNativeProxy
There are two sub-types:
As in some cases the clients need to detect any changes made to a database, a view also holds a modification counter, which any clients changing the database state must notify.
nativeHandle| Modifier and Type | Method and Description |
|---|---|
boolean |
canModify()
Returns true if this view allows modifications to the database state; false if it is
immutable.
|
Optional<StorageIndex> |
findOpenIndex(IndexAddress address)
Finds an open index by the given address.
|
Cleaner |
getCleaner()
Returns the cleaner of this view.
|
long |
getViewNativeHandle()
Returns a native handle of this view.
|
void |
registerIndex(StorageIndex index)
Registers a new index created with this view.
|
getNativeHandle, isValidHandlepublic boolean canModify()
public long getViewNativeHandle()
IllegalStateException - if the view is invalid (closed or nullptr)public Optional<StorageIndex> findOpenIndex(IndexAddress address)
This method is for internal use. It is not designed to be used by services, rather by index factories.
address - the index addressOptional.empty() if no index
with such address was open in this viewpublic void registerIndex(StorageIndex index)
This method is for internal use. It is not designed to be used by services, rather by index factories.
index - a new index to registerIllegalArgumentException - if the index is already registeredfindOpenIndex(IndexAddress)public Cleaner getCleaner()
Copyright © 2019 Exonum. All rights reserved.