Revision 4580 trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/layers/VectorialFileAdapter.java

View differences:

VectorialFileAdapter.java
101 101
	 *
102 102
	 * @throws DriverIOException
103 103
	 */
104
	public void start() throws DriverIOException {
104
	public synchronized void start() throws DriverIOException {
105 105
		try {
106 106
		    if (reference_count == 0)
107 107
		    {
......
125 125
	 *
126 126
	 * @throws DriverIOException
127 127
	 */
128
	public void stop() throws DriverIOException {
128
	public synchronized void stop() throws DriverIOException {
129 129
		try {
130 130
		    if (reference_count == 0)
131 131
		    {
......
142 142
	}
143 143

  
144 144
	/**
145
	 * Is synchronized to allow thread safe access to features stored
146
	 * in files.
147
	 * 
145 148
	 * @see com.iver.cit.gvsig.fmap.layers.ReadableVectorial#getShape(int)
146 149
	 */
147
	public IGeometry getShape(int index) throws DriverIOException {
150
	public synchronized IGeometry getShape(int index) throws DriverIOException {
148 151
		try {
149 152
			return getFileDriver().getShape(index);
150 153
		} catch (IOException e) {
......
200 203
	public File getFile() {
201 204
		return file;
202 205
	}
203

  
204
    public IFeature getFeature(int numReg) throws com.iver.cit.gvsig.fmap.DriverException
206
	/**
207
	 * Returns the feature whose index is numReg
208
	 * <br>
209
	 * Is synchronized to do thread safe accessing to features
210
	 * stored in files.
211
	 * @param numReg index of feature
212
	 * @return feature
213
	 * 
214
	 */
215
    public synchronized IFeature getFeature(int numReg) throws com.iver.cit.gvsig.fmap.DriverException
205 216
    {
206 217
        IGeometry geom;
207 218
        IFeature feat = null;

Also available in: Unified diff