Package org.apache.isis.runtimes.dflt.objectstores.nosql

Examples of org.apache.isis.runtimes.dflt.objectstores.nosql.NoSqlStoreException


        // TODO deal with buffer overrun
        while ((c = input.read()) != ' ' && c != '\n' && c != -1) {
            buffer[i++] = (byte) c;
        }
        if (i == 0) {
            throw new NoSqlStoreException("No data read from " + input);
        }
        final String read = new String(buffer, 0, i);
        LOG.debug("read " + read);
        return read;
    }
View Full Code Here


                this.header = 0;
                return true;
            }
        } catch (final IOException e) {
            logFailure();
            throw new NoSqlStoreException(e);
        }
    }
View Full Code Here

                logFailure();
                throw new RemotingException("command didn't end with an empty blank line, aborting request");
            }
        } catch (final IOException e) {
            logFailure();
            throw new NoSqlStoreException(e);
        }
    }
View Full Code Here

        try {
            m = new Mongo(host, port);
            db = m.getDB(dbName);
            LOG.info("opened database (" + dbName + "): " + db);
        } catch (final UnknownHostException e) {
            throw new NoSqlStoreException(e);
        } catch (final MongoException e) {
            throw new NoSqlStoreException(e);
        }
    }
View Full Code Here

                return new MongoStateReader(cursor.next());
            }

            @Override
            public void remove() {
                throw new NoSqlStoreException("Can't remove elements");
            }

        };
    }
View Full Code Here

    public StateWriter addAggregate(final String id) {
        final JsonStateWriter jsonStateWriter = new JsonStateWriter(null, null);
        try {
            dbObject.put(id, jsonStateWriter.dbObject);
        } catch (final JSONException e) {
            throw new NoSqlStoreException(e);
        }
        return jsonStateWriter;
    }
View Full Code Here

    @Override
    public void writeField(final String id, final String data) {
        try {
            dbObject.put(id, data == null ? JSONObject.NULL : data);
        } catch (final JSONException e) {
            throw new NoSqlStoreException(e);
        }
    }
View Full Code Here

    @Override
    public void writeField(final String id, final long l) {
        try {
            dbObject.put(id, Long.toString(l));
        } catch (final JSONException e) {
            throw new NoSqlStoreException(e);
        }
    }
View Full Code Here

    public String getData() {
        try {
            return dbObject.toString(4);
        } catch (final JSONException e) {
            throw new NoSqlStoreException(e);
        }
    }
View Full Code Here

            collection.add(((JsonStateWriter) writer).dbObject);
        }
        try {
            dbObject.put(id, collection);
        } catch (final JSONException e) {
            throw new NoSqlStoreException(e);
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.isis.runtimes.dflt.objectstores.nosql.NoSqlStoreException

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.