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

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


            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


       
        String encodedChecksum = data.substring(0, 8);
        long expectedChecksum = Long.valueOf(encodedChecksum, 16);
       
        if (actualChecksum != expectedChecksum) {
            throw new NoSqlStoreException("Data integrity error; checksums different");
        }

        return objectData;
    }
View Full Code Here

                fileOutput.close();

                long calculatedChecksum = crc32.getValue();
                long sentChecksum = input.readLong();
                if (calculatedChecksum != sentChecksum) {
                    throw new NoSqlStoreException("Checksum didn't match during download of " + file.getName());
                }

                recover(file);
                File renameTo = Util.logFile(logId);
                file.renameTo(renameTo);
View Full Code Here

                String line = reader.readLine();
                if (line == null) {
                    break;
                }
                if (!line.startsWith("#transaction started")) {
                    throw new NoSqlStoreException("No transaction start found: " + line + " (" + reader.getLineNumber() + ")");
                }
                readTransaction(reader);
            }
        } catch (IOException e) {
            throw new NoSqlStoreException(e);
        } finally {
            if (reader != null) {
                try {
                    reader.close();
                } catch (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.