X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.databoard%2Fsrc%2Forg%2Fsimantics%2Fdataboard%2Faccessor%2Ffile%2FFileAccessor.java;h=97a0f5f6c6ccadf39f8cccf25b42bca1082dc16c;hb=0ae2b770234dfc3cbb18bd38f324125cf0faca07;hp=7a90e096bf8ddc847315e0389077ffea3e74abf8;hpb=24e2b34260f219f0d1644ca7a138894980e25b14;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.databoard/src/org/simantics/databoard/accessor/file/FileAccessor.java b/bundles/org.simantics.databoard/src/org/simantics/databoard/accessor/file/FileAccessor.java index 7a90e096b..97a0f5f6c 100644 --- a/bundles/org.simantics.databoard/src/org/simantics/databoard/accessor/file/FileAccessor.java +++ b/bundles/org.simantics.databoard/src/org/simantics/databoard/accessor/file/FileAccessor.java @@ -1,49 +1,49 @@ -/******************************************************************************* - * Copyright (c) 2010 Association for Decentralized Information Management in - * Industry THTH ry. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * VTT Technical Research Centre of Finland - initial API and implementation - *******************************************************************************/ +/******************************************************************************* + * Copyright (c) 2010 Association for Decentralized Information Management in + * Industry THTH ry. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * VTT Technical Research Centre of Finland - initial API and implementation + *******************************************************************************/ package org.simantics.databoard.accessor.file; -import java.io.File; - -import org.simantics.databoard.accessor.Accessor; -import org.simantics.databoard.accessor.CloseableAccessor; -import org.simantics.databoard.accessor.binary.BinaryObject; -import org.simantics.databoard.accessor.error.AccessorException; -import org.simantics.databoard.binding.Binding; - -/** - * 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 - * @see BinaryObject File/Memory Byte[] implementation - * @see FileArrayAccessor - * @see FileBooleanAccessor - * @see FileByteAccessor - * @see FileDoubleAccessor - * @see FileFloatAccessor - * @see FileIntegerAccessor - * @see FileLongAccessor - * @see FileMapAccessor - * @see FileOptionalAccessor - * @see FileRecordAccessor - * @see FileStringAccessor - * @see FileUnionAccessor - * @see FileVariantAccessor - * @author Toni Kalajainen +import java.io.File; + +import org.simantics.databoard.accessor.Accessor; +import org.simantics.databoard.accessor.CloseableAccessor; +import org.simantics.databoard.accessor.binary.BinaryObject; +import org.simantics.databoard.accessor.error.AccessorException; +import org.simantics.databoard.binding.Binding; + +/** + * 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 + * @see BinaryObject File/Memory Byte[] implementation + * @see FileArrayAccessor + * @see FileBooleanAccessor + * @see FileByteAccessor + * @see FileDoubleAccessor + * @see FileFloatAccessor + * @see FileIntegerAccessor + * @see FileLongAccessor + * @see FileMapAccessor + * @see FileOptionalAccessor + * @see FileRecordAccessor + * @see FileStringAccessor + * @see FileUnionAccessor + * @see FileVariantAccessor + * @author Toni Kalajainen */ public interface FileAccessor extends Accessor, CloseableAccessor { @@ -73,13 +73,13 @@ public interface FileAccessor extends Accessor, CloseableAccessor { * @throws AccessorException */ void flush() throws AccessorException; - - /** - * Reset internal buffer. If there unwritten changes, they are flushed. - * - * @throws AccessorException - */ - void reset() throws AccessorException; + + /** + * Reset internal buffer. If there unwritten changes, they are flushed. + * + * @throws AccessorException + */ + void reset() throws AccessorException; /** * Write a value to the file without flushing the writebuffer yet. @@ -90,8 +90,8 @@ public interface FileAccessor extends Accessor, CloseableAccessor { * @param newValue * @throws AccessorException */ - void setValueNoflush(Binding binding, Object newValue) throws AccessorException; - + void setValueNoflush(Binding binding, Object newValue) throws AccessorException; + }