Package org.apache.isis.objectstore.nosql

Examples of org.apache.isis.objectstore.nosql.NoSqlStoreException


                fileOutput.close();

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

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


                final 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 (final IOException e) {
            throw new NoSqlStoreException(e);
        } finally {
            if (reader != null) {
                try {
                    reader.close();
                } 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

                LOG.info("opened database (" + dbName + "): " + mongo);
            } else {
                LOG.info(" using opened database " + 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

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

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

        };
    }
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

TOP

Related Classes of org.apache.isis.objectstore.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.