Package org.geowebcache.diskquota.storage

Examples of org.geowebcache.diskquota.storage.TileSet


        return false;
    }

    private void commit(final TimedQuotaUpdate aggregatedUpadte) throws InterruptedException {
        final TileSet tileSet = aggregatedUpadte.getTileSet();
        final Quota quotaDiff = aggregatedUpadte.getAccummulatedQuotaDifference();

        Collection<PageStatsPayload> tileCountDiffs;
        tileCountDiffs = new ArrayList<PageStatsPayload>(
                aggregatedUpadte.getAccummulatedTilePageCounts());
View Full Code Here


            protected void doInTransactionWithoutResult(TransactionStatus status) {
                Set<TileSet> layerTileSets;
                if (!GLOBAL_QUOTA_NAME.equals(layerName)) {
                    layerTileSets = calculator.getTileSetsFor(layerName);
                } else {
                    layerTileSets = Collections.singleton(new TileSet(GLOBAL_QUOTA_NAME));
                }
                for (TileSet tset : layerTileSets) {
                    createTileSet(tset);
                }
View Full Code Here

        String getTileSet = dialect.getTileSetsQuery(schema);
        final TileSetRowMapper tileSetMapper = new TileSetRowMapper();
        jt.getJdbcOperations().query(getTileSet, new RowCallbackHandler() {

            public void processRow(ResultSet rs) throws SQLException {
                TileSet tileSet = tileSetMapper.mapRow(rs, 0);
                if (!GLOBAL_QUOTA_NAME.equals(tileSet.getId())) {
                    visitor.visit(tileSet, JDBCQuotaStore.this);
                }
            }
        });
    }
View Full Code Here

        });
    }

    public TileSet getTileSetById(String tileSetId) throws InterruptedException {
        // locate the tileset
        TileSet result = getTileSetByIdInternal(tileSetId);

        // make it compatible with BDB quota store behavior
        if (result == null) {
            throw new IllegalArgumentException("Could not find a tile set with id: " + tileSetId);
        }
View Full Code Here

        return jt.update(createTileSet, params) > 0;
    }

    protected TileSet getOrCreateTileSet(TileSet tileSet) {
        for (int i = 0; i < maxLoops; i++) {
            TileSet tset = getTileSetByIdInternal(tileSet.getId());
            if (tset != null) {
                return tset;
            }

            if (createTileSet(tileSet)) {
View Full Code Here

                            // sort the payloads by page id as a deadlock avoidance measure, out
                            // of order updates may result in deadlock with the addHitsAndSetAccessTime method
                            List<PageStatsPayload> sorted = sortPayloads(statsUpdates);
                            for (PageStatsPayload payload : sorted) {
                                // verify the stats are referring to an existing tile set id
                                TileSet tset = payload.getTileSet();
                                if (tset == null) {
                                    String tileSetId = payload.getPage().getTileSetId();
                                    tset = getTileSetByIdInternal(tileSetId);
                                    if (tset == null) {
                                        log.warn("Could not locate tileset with id " + tileSetId
View Full Code Here

            }
        });
    }

    public long[][] getTilesForPage(TilePage page) throws InterruptedException {
        TileSet tileSet = getTileSetById(page.getTileSetId());
        long[][] gridCoverage = calculator.toGridCoverage(tileSet, page);
        return gridCoverage;
    }
View Full Code Here

            String layerName = rs.getString(2);
            String gridSetId = rs.getString(3);
            String blobFormat = rs.getString(4);
            String parametersId = rs.getString(5);
            if (GLOBAL_QUOTA_NAME.equals(key)) {
                return new TileSet(key);
            } else {
                return new TileSet(layerName, gridSetId, blobFormat, parametersId);
            }
        }
View Full Code Here

TOP

Related Classes of org.geowebcache.diskquota.storage.TileSet

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.