root / trunk / libraries / libRaster / src / org / gvsig / raster / buffer / cache / ICacheDataSource.java @ 11081
History | View | Annotate | Download (2.17 KB)
1 | 11074 | nacho | |
---|---|---|---|
2 | /* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
|
||
3 | *
|
||
4 | * Copyright (C) 2006 IVER T.I. and Generalitat Valenciana.
|
||
5 | *
|
||
6 | * This program is free software; you can redistribute it and/or
|
||
7 | * modify it under the terms of the GNU General Public License
|
||
8 | * as published by the Free Software Foundation; either version 2
|
||
9 | * of the License, or (at your option) any later version.
|
||
10 | *
|
||
11 | * This program is distributed in the hope that it will be useful,
|
||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||
14 | * GNU General Public License for more details.
|
||
15 | *
|
||
16 | * You should have received a copy of the GNU General Public License
|
||
17 | * along with this program; if not, write to the Free Software
|
||
18 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA.
|
||
19 | */
|
||
20 | package org.gvsig.raster.buffer.cache; |
||
21 | |||
22 | import java.io.IOException; |
||
23 | |||
24 | /**
|
||
25 | * Interfaz que debe implementar una fuente de datos de un cache. Las fuentes
|
||
26 | * de datos deben interpretar la estructura de la cache para que cuando se les
|
||
27 | * solicite una p?gina de la cach? sepan que extent de la fuente de datos deben
|
||
28 | * cargar en el buffer.
|
||
29 | *
|
||
30 | * @author Nacho Brodin (nachobrodin@gmail.com)
|
||
31 | *
|
||
32 | */
|
||
33 | public interface ICacheDataSource{ |
||
34 | /**
|
||
35 | * Carga una p?gina especificada en el par?metro nPag con los datos necesarios. La
|
||
36 | * petici?n que ha de hacerse se calcula previamente con la estructura de la cach?.
|
||
37 | *
|
||
38 | * @param nPag N?mero de p?gina a cargar
|
||
39 | * @param pageBuffer Buffer de datos a cargar.
|
||
40 | */
|
||
41 | public void loadPage(PageBandBuffer pageBuffer); |
||
42 | |||
43 | /**
|
||
44 | * Salva una p?gina especificada en el par?metro nPag a disco. La
|
||
45 | * petici?n que ha de hacerse se calcula previamente con la estructura de la cach?.
|
||
46 | *
|
||
47 | * @param nPag N?mero de p?gina a salvar
|
||
48 | * @param pageBuffer Buffer de datos a salvar.
|
||
49 | * @throws IOException
|
||
50 | */
|
||
51 | public void savePage(PageBandBuffer pageBuffer)throws IOException; |
||
52 | |||
53 | /**
|
||
54 | * Elimina la fuente de datos de disco
|
||
55 | * @throws IOException
|
||
56 | */
|
||
57 | public void delete()throws IOException; |
||
58 | |||
59 | /**
|
||
60 | * Obtiene la ruta a la fuente de datos
|
||
61 | * @return Cadena con la ruta a la fuente de datos
|
||
62 | */
|
||
63 | public String getPath(); |
||
64 | } |