generated.docs.javadoc.org.eclipse.dawnsci.hdf5.HDF5File.html Maven / Gradle / Ivy
HDF5File (h5jan API)
org.eclipse.dawnsci.hdf5
Class HDF5File
- java.lang.Object
-
- org.eclipse.dawnsci.hdf5.HDF5File
-
public class HDF5File
extends java.lang.Object
Class to hold state of a HDF5 file
-
-
Constructor Summary
Constructors
Constructor and Description
HDF5File(java.lang.String filePath,
long id,
boolean writeable,
boolean canBeSWMR)
-
Method Summary
All Methods Instance Methods Concrete Methods
Modifier and Type
Method and Description
boolean
addWriteJob(ILazyWriteableDataset destination,
IDataset data,
SliceND slice)
Add write job
boolean
canSwitchSWMR()
void
closeDataset(java.lang.String dataPath)
Close dataset if its IDs were cached
boolean
containsDataset(java.lang.String dataPath)
int
decrementCount()
Decrement number of accessors of file
void
finish(long milliseconds)
Finish with file
void
flushDataset(java.lang.String dataPath)
Flush dataset if it has been opened and cached
void
flushDatasets()
Flush all datasets whose IDs have been opened and cached
void
flushWrites()
Finish all writes (block until it is done)
int
getCount()
long
getID()
long
getTime()
int
incrementCount()
Increment number of accessors of file
boolean
isWriteable()
long[]
openDataset(java.lang.String dataPath)
Open dataset
void
setDatasetIDsCaching(boolean cacheIDs)
Set dataset IDs caching
void
setTime(long time)
Set release time
java.lang.String
toString()
-
-
Constructor Detail
-
HDF5File
public HDF5File(java.lang.String filePath,
long id,
boolean writeable,
boolean canBeSWMR)
- Parameters:
filePath
-
id
-
writeable
-
canBeSWMR
- if true, can be a SWMR writer (must be writeable too)
-
Method Detail
-
getID
public long getID()
-
getTime
public long getTime()
- Returns:
- release time
-
setTime
public void setTime(long time)
Set release time
- Parameters:
time
-
-
getCount
public int getCount()
- Returns:
- number of accessors of file
-
incrementCount
public int incrementCount()
Increment number of accessors of file
- Returns:
- incremented value
-
decrementCount
public int decrementCount()
Decrement number of accessors of file
- Returns:
- decremented value
-
isWriteable
public boolean isWriteable()
- Returns:
- true if file is writable
-
canSwitchSWMR
public boolean canSwitchSWMR()
- Returns:
- true if the switch to SWMR writer mode has succeeded
-
addWriteJob
public boolean addWriteJob(ILazyWriteableDataset destination,
IDataset data,
SliceND slice)
Add write job
- Parameters:
destination
-
data
-
slice
-
- Returns:
- true if writeable
-
flushWrites
public void flushWrites()
Finish all writes (block until it is done)
-
finish
public void finish(long milliseconds)
Finish with file
- Parameters:
milliseconds
- to wait before finishing
-
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
-
setDatasetIDsCaching
public void setDatasetIDsCaching(boolean cacheIDs)
Set dataset IDs caching
- Parameters:
cacheIDs
- if true, then also do not close
-
openDataset
public long[] openDataset(java.lang.String dataPath)
Open dataset
This can use cached IDs and store them too if set to do so
- Parameters:
dataPath
-
- Returns:
- IDs of dataset and its data space
-
closeDataset
public void closeDataset(java.lang.String dataPath)
Close dataset if its IDs were cached
- Parameters:
dataPath
-
-
flushDataset
public void flushDataset(java.lang.String dataPath)
Flush dataset if it has been opened and cached
- Parameters:
dataPath
-
-
flushDatasets
public void flushDatasets()
Flush all datasets whose IDs have been opened and cached
-
containsDataset
public boolean containsDataset(java.lang.String dataPath)
- Parameters:
dataPath
-
- Returns:
- true if dataset IDs are cached