Package com.netflix.paas.exceptions

Examples of com.netflix.paas.exceptions.NotFoundException


    public DbDataResource getSchemaDataResource(
          @PathParam("schema") String schemaName
          ) throws NotFoundException {
        DbDataResource resource = schemaResources.get(schemaName);
        if (resource == null) {
            throw new NotFoundException(DbDataResource.class, schemaName);
        }
        return resource;
    }
View Full Code Here


            try {
                Preconditions.checkNotNull(table.getStorageType());
               
                TableDataResourceFactory tableDataResourceFactory = tableDataResourceFactories.get(table.getStorageType());
                if (tableDataResourceFactory == null) {
                    throw new NotFoundException(TableDataResourceFactory.class, table.getStorageType());
                }
               
                builder.put(table.getTableName(), tableDataResourceFactory.getTableDataResource(table));
            }
            catch (Exception e) {
View Full Code Here

    @Path("{table}")
    public TableDataResource getTableSubresource(@PathParam("table") String tableName) throws NotFoundException {
        TableDataResource resource = tables.get(tableName);
        if (resource == null) {
            throw new NotFoundException(TableDataResource.class, tableName);
        }
        return resource;
    }
View Full Code Here

   
    @Path("clusters/{id}")
    public CassandraClusterAdminResource getCluster(@PathParam("id") String clusterName) throws NotFoundException {
        CassandraClusterAdminResource resource = clusters.get(clusterName);
        if (resource == null) {
            throw new NotFoundException(CassandraClusterAdminResource.class, clusterName);
        }
        return resource;
    }
View Full Code Here

    }

    public ColumnFamilyEntity getColumnFamily(String columnFamilyName) throws NotFoundException {
        ColumnFamilyEntity entity = columnFamilyEntities.get(columnFamilyName);
        if (entity == null)
            throw new NotFoundException("columnfamily", columnFamilyName);
        return entity;
    }
View Full Code Here

    public CassandraKeyspaceHolder getKeyspace(String keyspaceName) throws NotFoundException {
        Preconditions.checkNotNull(keyspaceName);
       
        CassandraKeyspaceHolder keyspace = keyspaces.get(keyspaceName);
        if (keyspace == null)
            throw new NotFoundException("keyspace", keyspaceName);
        return keyspace;
    }
View Full Code Here

            QueryResult dr = new QueryResult();
            dr.setSrows(builder.build());
           
            return dr;
        } catch (com.netflix.astyanax.connectionpool.exceptions.NotFoundException e) {
            throw new NotFoundException(
                    "column",
                    String.format("%s.%s.%s.%s", key, column, this.keyspace.getKeyspaceName(), this.columnFamily.getName()));
        } catch (ConnectionException e) {
            throw new PaasException(
                    String.format("Failed to read row '%s' in column family '%s.%s'" ,
View Full Code Here

            String daoType = configuration.getString(propertyName);
            Preconditions.checkNotNull(daoType, "No DaoType specified for " + schemaName + " (" + propertyName + ")");
            DaoSchemaProvider provider = schemaTypes.get(daoType);
            if (provider == null) {
                LOG.warn("Unable to find DaoManager for schema " + schemaName + "(" + daoType + ")");
                throw new NotFoundException(DaoSchemaProvider.class, daoType);
            }
            schema = provider.getSchema(schemaName);
            schemas.put(schemaName, schema);
            LOG.info("Created DaoSchema for " + schemaName);
        }
View Full Code Here

     * @throws NotFoundException
     */
    public TableDataResource getColumnFamilyDataResource(String columnFamily) throws NotFoundException {
        TableDataResource resource = columnFamilies.get(columnFamily);
        if (resource == null)
            throw new NotFoundException("columnfamily", columnFamily);
        return resource;
    }
View Full Code Here

TOP

Related Classes of com.netflix.paas.exceptions.NotFoundException

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.