|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface FileAccessor
File accessor is an interface for data that is located in a file in byte format. There are two ways of writing to the files. A) Using the writing methods of Accessor+subtypes, eg. setValue, putValue, ... They guarantee the value is flushed to the file upon return B) Using the write methods of FileAccessor+subtypes, eg. setValueNoflush, putValueNoflush ... They do not guarantee flush upon return. Explicit flush() call is required. The value resides in memory cache and are available for reading event before flushing. see FileAccessorExample
File/Memory Byte[] implementation
,
FileArrayAccessor
,
FileBooleanAccessor
,
FileByteAccessor
,
FileDoubleAccessor
,
FileFloatAccessor
,
FileIntegerAccessor
,
FileLongAccessor
,
FileMapAccessor
,
FileOptionalAccessor
,
FileRecordAccessor
,
FileStringAccessor
,
FileUnionAccessor
,
FileVariantAccessor
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.simantics.databoard.accessor.Accessor |
---|
Accessor.Listener |
Method Summary | |
---|---|
void |
close()
Close the file. |
java.io.File |
file()
Get the file |
void |
flush()
Flush the internal write buffer to the disc. |
void |
setValueNoflush(Binding binding,
java.lang.Object newValue)
Write a value to the file without flushing the writebuffer yet. |
Methods inherited from interface org.simantics.databoard.accessor.Accessor |
---|
addListener, apply, getAccessor, getValue, removeListener, setValue, type |
Method Detail |
---|
java.io.File file()
void close() throws AccessorException
close
in interface CloseableAccessor
AccessorException
void flush() throws AccessorException
Note, all the write methods of Accessor
and its sub-interfaces
guarantee Durability. They flush the value immediately and do not require
separate flush()
.
AccessorException
void setValueNoflush(Binding binding, java.lang.Object newValue) throws AccessorException
flush()
.
binding
- newValue
-
AccessorException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |