|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.geotools.caching.grid.spatialindex.store.DiskStorage
public class DiskStorage
A storage that stores data in a file on disk.
Create new instances with static factory method DiskStorage.createInstance()
or DiskStorage.createInstance(PropertySet)
Field Summary | |
---|---|
static java.lang.String |
DATA_FILE_PROPERTY
|
static java.lang.String |
INDEX_FILE_PROPERTY
|
protected static java.util.logging.Logger |
logger
|
static java.lang.String |
PAGE_SIZE_PROPERTY
|
Fields inherited from interface org.geotools.caching.spatialindex.Storage |
---|
STORAGE_TYPE_PROPERTY |
Method Summary | |
---|---|
void |
addFeatureType(org.opengis.feature.type.FeatureType ft)
Adds a feature type to the store. |
void |
clear()
Removes all entries from the disk store and clears the associated feature types. |
void |
clearFeatureTypes()
Clears all feature types associated with store |
static Storage |
createInstance()
Default factory method : create a new Storage of type DiskStorage, with page size set to default 1000 bytes, and data file is a new temporary file. |
static Storage |
createInstance(java.util.Properties pset)
Factory method : create a new Storage of type DiskStorage. |
void |
dispose()
Disposes of the store. |
NodeIdentifier |
findUniqueInstance(NodeIdentifier id)
|
void |
flush()
Writes the index file. |
Node |
get(NodeIdentifier id)
Gets a particular node |
ReferencedEnvelope |
getBounds()
Get the bounds of data in the store. |
java.util.Collection<org.opengis.feature.type.FeatureType> |
getFeatureTypes()
Gets the feature types supported by the store. |
java.util.Properties |
getPropertySet()
Get properties about the given storage. |
protected void |
initializeFromIndex()
Initializes the store from the index file. |
void |
put(Node n)
Adds a node to the store. |
void |
remove(NodeIdentifier id)
Removes a node from the store. |
void |
setBounds(ReferencedEnvelope bounds)
Sets the bounds of the store |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String DATA_FILE_PROPERTY
public static final java.lang.String INDEX_FILE_PROPERTY
public static final java.lang.String PAGE_SIZE_PROPERTY
protected static java.util.logging.Logger logger
Method Detail |
---|
public static Storage createInstance(java.util.Properties pset)
property
- set
public static Storage createInstance()
public void clear()
clear
in interface Storage
public Node get(NodeIdentifier id)
get
in interface Storage
id
- identifier of the node to read
public void put(Node n)
put
in interface Storage
public void remove(NodeIdentifier id)
remove
in interface Storage
id
- identifier of the node to removepublic void dispose()
This flushes all data and closes file handles
dispose
in interface Storage
public void flush()
This does not close the data files.
flush
in interface Storage
protected void initializeFromIndex() throws java.io.IOException
java.io.IOException
public java.util.Properties getPropertySet()
Storage
getPropertySet
in interface Storage
public NodeIdentifier findUniqueInstance(NodeIdentifier id)
findUniqueInstance
in interface Storage
public void addFeatureType(org.opengis.feature.type.FeatureType ft)
addFeatureType
in interface Storage
ft
- feature type to addpublic java.util.Collection<org.opengis.feature.type.FeatureType> getFeatureTypes()
getFeatureTypes
in interface Storage
public void clearFeatureTypes()
clearFeatureTypes
in interface Storage
public void setBounds(ReferencedEnvelope bounds)
setBounds
in interface Storage
public ReferencedEnvelope getBounds()
getBounds
in interface Storage
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |