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

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


    public JsonStateReader(final String data) {
        try {
            final JSONObject instance = new JSONObject(data);
            this.instance = instance;
        } catch (final JSONException e) {
            throw new NoSqlStoreException("failed initialise JSON object for text form: " + data, e);
        }
    }
View Full Code Here


            } else {
                encryptionType = "none";
            }
            return encryptionType;
        } catch (final JSONException e) {
            throw new NoSqlStoreException("failed to read field _encrypt", e);
        }
    }
View Full Code Here

    private String readRequiredField(final String name) {
        try {
            final Object value = instance.get(name);
            return (String) value;
        } catch (final JSONException e) {
            throw new NoSqlStoreException("failed to read field " + name, e);
        }
    }
View Full Code Here

            final Socket socket;
            socket = new Socket(host, port);
            socket.setSoTimeout(timeout);
            return new ClientConnection(socket.getInputStream(), socket.getOutputStream());
        } catch (final UnknownHostException e) {
            throw new NoSqlStoreException("Unknow host " + host, e);
        } catch (final IOException e) {
            throw new NoSqlStoreException("Failed to connect to " + host + ":" + port, e);
        }

    }
View Full Code Here

        final String encodedChecksum = data.substring(0, 8);
        final long expectedChecksum = Long.valueOf(encodedChecksum, 16);

        if (actualChecksum != expectedChecksum) {
            throw new NoSqlStoreException("Data integrity error; checksums different");
        }

        return objectData;
    }
View Full Code Here

        try {
            final String response = reader.readLine();
            LOG.debug("response: " + response);
            headers = response.split(" ");
        } catch (final IOException e) {
            throw new NoSqlStoreException(e);
        }
    }
View Full Code Here

            } else {
                connection.response("");
            }

        } catch (final IOException e) {
            throw new NoSqlStoreException(Util.READ_ERROR, e);
        }
    }
View Full Code Here

            } else {
                connection.ok();
                readInstance(reader, connection);
            }
        } catch (final IOException e) {
            throw new NoSqlStoreException(Util.READ_ERROR + " for " + type + "/" + id, e);
        } finally {
            locks.release(id, getTransactionId());
        }

    }
View Full Code Here

            } else {
                connection.error(error);
            }

        } catch (final IOException e) {
            throw new NoSqlStoreException("Failed to write data", e);
        } finally {
            if (files != null) {
                releaseLocks(files);
            }
        }
View Full Code Here

        } finally {
            if (fileOut != null) {
                try {
                    fileOut.close();
                } catch (final IOException 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.