Package com.persistit.AlertMonitor

Examples of com.persistit.AlertMonitor.Event


                    /*
                     * If ignoreMissingVolumes is enabled, then issue a warning
                     * Alert, but allow recovery or rollback to continue.
                     */
                    db.getAlertMonitor().post(
                            new Event(AlertLevel.WARN, db.getLogBase().missingVolume, vnfe.getMessage(), address
                                    + position - start), AlertMonitor.MISSING_VOLUME_CATEGORY);
                    ignoredUpdates.incrementAndGet();
                } else {
                    failedUpdates.incrementAndGet();
                    throw vnfe;
View Full Code Here


                action.performAction(_persistit, null);
                _performed.incrementAndGet();
            } catch (final PersistitException e) {
                lastException(e);
                _persistit.getAlertMonitor().post(
                        new Event(AlertLevel.ERROR, _persistit.getLogBase().cleanupException, e, action),
                        AlertMonitor.CLEANUP_CATEGORY);
                _errors.incrementAndGet();
            }
        }
    }
View Full Code Here

                        buffer.getBufferSize(), buffer.getIndex());
                _volume.getStatistics().bumpReadCounter();

            } catch (final IOException ioe) {
                _persistit.getAlertMonitor().post(
                        new Event(AlertLevel.ERROR, _persistit.getLogBase().readException, ioe, _volume, page,
                                buffer.getIndex()), AlertMonitor.READ_PAGE_CATEGORY);
                throw new PersistitIOException(ioe);
            }
        } finally {
            release();
View Full Code Here

        try {
            _channel.write(bb, page * _volume.getStructure().getPageSize());
        } catch (final IOException ioe) {
            _persistit.getAlertMonitor().post(
                    new Event(AlertLevel.ERROR, _persistit.getLogBase().writeException, ioe, _volume, page),
                    AlertMonitor.WRITE_PAGE_CATEGORY);
            throw new PersistitIOException(ioe);
        }
    }
View Full Code Here

            _volume.getStatistics().setLastExtensionTime(System.currentTimeMillis());
            _extendedPageCount = pageCount;
        } catch (final IOException ioe) {
            _persistit.getAlertMonitor().post(
                    new Event(AlertLevel.ERROR, _persistit.getLogBase().extendException, ioe, _volume.getName(),
                            currentSize, newSize), AlertMonitor.EXTEND_VOLUME_CATEGORY);
            throw new PersistitIOException(ioe);
        }
    }
View Full Code Here

                _persistit.getIOMeter().chargeCopyPageFromJournal(volume, pageAddress, volume.getPageSize(),
                        stablePageNode.getJournalAddress(), urgency());
            } catch (final PersistitException ioe) {
                _persistit
                        .getAlertMonitor()
                        .post(new Event(AlertLevel.ERROR, _persistit.getLogBase().copyException, ioe, volume,
                                pageNode.getPageAddress(), pageNode.getJournalAddress()), AlertMonitor.JOURNAL_CATEGORY);
                throw ioe;
            }

            Debug.$assert0.t(pageAddress == pageNode.getPageAddress());
View Full Code Here

                        handle = pageNode.getVolumeHandle();
                        volume = candidate;
                    }
                } catch (final VolumeNotFoundException vnfe) {
                    _persistit.getAlertMonitor().post(
                            new Event(AlertLevel.WARN, _persistit.getLogBase().missingVolume, candidate,
                                    pageNode.getJournalAddress()), AlertMonitor.MISSING_VOLUME_CATEGORY);
                    if (_ignoreMissingVolume.get()) {
                        _persistit.getLogBase().lostPageFromMissingVolume.log(pageNode.getPageAddress(), candidate,
                                pageNode.getJournalAddress());
                        // Not removing the page from the List here will cause
View Full Code Here

         */
        final int journalFileCount = getJournalFileCount();
        if (journalFileCount != _lastReportedJournalFileCount) {
            if (journalFileCount > TOO_MANY_ERROR_THRESHOLD + _urgentFileCountThreshold) {
                _persistit.getAlertMonitor()
                        .post(new Event(AlertLevel.ERROR, _persistit.getLogBase().tooManyJournalFilesError,
                                journalFileCount), AlertMonitor.MANY_JOURNAL_FILES);
            } else if (journalFileCount > TOO_MANY_WARN_THRESHOLD + _urgentFileCountThreshold) {
                _persistit.getAlertMonitor()
                        .post(new Event(AlertLevel.WARN, _persistit.getLogBase().tooManyJournalFilesWarning,
                                journalFileCount), AlertMonitor.MANY_JOURNAL_FILES);
            } else {
                _persistit.getAlertMonitor().post(
                        new Event(AlertLevel.NORMAL, _persistit.getLogBase().normalJournalFileCount, journalFileCount),
                        AlertMonitor.MANY_JOURNAL_FILES);
            }
            _lastReportedJournalFileCount = journalFileCount;
        }
    }
View Full Code Here

                } catch (final Exception e) {
                    if (e instanceof InterruptedException || e instanceof FatalErrorException) {
                        _closed.set(true);
                    } else if (e instanceof PersistitException) {
                        _persistit.getAlertMonitor().post(
                                new Event(AlertLevel.ERROR, _persistit.getLogBase().journalWriteError, e,
                                        addressToFile(_writeBufferAddress), addressToOffset(_writeBufferAddress)),
                                AlertMonitor.JOURNAL_CATEGORY);
                    } else {
                        _persistit.getLogBase().journalWriteError.log(e, addressToFile(_writeBufferAddress),
                                addressToOffset(_writeBufferAddress));
View Full Code Here

                action.performAction(_persistit);
                _performed.incrementAndGet();
            } catch (final PersistitException e) {
                lastException(e);
                _persistit.getAlertMonitor().post(
                        new Event(AlertLevel.ERROR, _persistit.getLogBase().cleanupException, e, action),
                        AlertMonitor.CLEANUP_CATEGORY);
                _errors.incrementAndGet();
            }
        }
    }
View Full Code Here

TOP

Related Classes of com.persistit.AlertMonitor.Event

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.