Revision 27361 trunk/libraries/libRaster/src/org/gvsig/raster/buffer/cache/Cache.java
Cache.java | ||
---|---|---|
664 | 664 |
* @param group Grupo sobre el que se carga la p?gina nPag |
665 | 665 |
* @param posInGroupPageToReplace Posici?n dentro del grupo sobre el que se carga la p?gina |
666 | 666 |
* @param nPag P?gina a cargar |
667 |
* @throws InterruptedException |
|
667 | 668 |
*/ |
668 |
public void loadPage(int group, int posInGroupPageToReplace, int nPag) { |
|
669 |
public void loadPage(int group, int posInGroupPageToReplace, int nPag) throws InterruptedException {
|
|
669 | 670 |
page[group * getPagsPerGroup() + posInGroupPageToReplace].loadPage(nPag); |
670 | 671 |
} |
671 | 672 |
|
... | ... | |
677 | 678 |
* @param posInGroupPageToReplace Posici?n dentro del grupo del que se salva la p?gina |
678 | 679 |
* @param nPag P?gina a salvar |
679 | 680 |
* @throws IOException |
681 |
* @throws InterruptedException |
|
680 | 682 |
*/ |
681 |
public void savePage(int group, int posInGroupPageToReplace, int nPag) throws IOException { |
|
683 |
public void savePage(int group, int posInGroupPageToReplace, int nPag) throws IOException, InterruptedException {
|
|
682 | 684 |
page[group * getPagsPerGroup() + posInGroupPageToReplace].savePage(nPag); |
683 | 685 |
} |
684 | 686 |
|
... | ... | |
686 | 688 |
* Salva a disco todas las p?ginas en memoria cach? e inicializa estructuras de datos. |
687 | 689 |
* |
688 | 690 |
* @throws IOException |
691 |
* @throws InterruptedException |
|
689 | 692 |
*/ |
690 |
public void resetCache() throws IOException { |
|
693 |
public void resetCache() throws IOException, InterruptedException {
|
|
691 | 694 |
for (int iCachePage = 0; iCachePage < page.length; iCachePage++) { |
692 | 695 |
if(modified[iCachePage]) |
693 | 696 |
page[iCachePage].savePage(this.getRasterPageNumberInPosition(iCachePage)); |
... | ... | |
700 | 703 |
* las estructuras de control de cach?. |
701 | 704 |
* @param nBand N?mero de banda a eliminar |
702 | 705 |
* @throws IOException |
706 |
* @throws InterruptedException |
|
703 | 707 |
*/ |
704 |
public void deleteBand(int nBand) throws IOException { |
|
708 |
public void deleteBand(int nBand) throws IOException, InterruptedException {
|
|
705 | 709 |
resetCache(); |
706 | 710 |
for (int iPage = 0; iPage < hddPage.length; iPage++) |
707 | 711 |
hddPage[iPage].deleteBand(nBand); |
... | ... | |
711 | 715 |
* Asigna una banda de disco a todas las p?ginas. |
712 | 716 |
* @param cacheDataSource Fuente de las p?ginas. Es la referencia a disco de ellas. |
713 | 717 |
* @throws IOException |
718 |
* @throws InterruptedException |
|
714 | 719 |
*/ |
715 |
public void assignBand(int nBand, ICacheDataSource[] cacheDataSource) throws IOException { |
|
720 |
public void assignBand(int nBand, ICacheDataSource[] cacheDataSource) throws IOException, InterruptedException {
|
|
716 | 721 |
resetCache(); |
717 | 722 |
for (int iPage = 0; iPage < hddPage.length; iPage++) |
718 | 723 |
hddPage[iPage].assignBand(nBand, cacheDataSource[iPage]); |
Also available in: Unified diff