Package krati

Examples of krati.PersistableListener


      }
    }
  }
 
  protected void initPersistableListener() {
    indexedStore.setPersistableListener(new PersistableListener() {
      @Override
      public void beforePersist() {}
     
      @Override
      public void afterPersist() {
View Full Code Here


 
  /**
   * Initializes the buffer persist listener.
   */
  protected void initPersistableListener() {
    final PersistableListener originalListener = buffer.getUnderlyingStore().getPersistableListener();
    buffer.getUnderlyingStore().setPersistableListener(new PersistableListener() {
      final PersistableListener origin = originalListener;
      @Override
      public void beforePersist() {
        try {
          extension.persist();
View Full Code Here

   
    /**
     * Fire beforePersist events to the PersistableListener.
     */
    protected void fireBeforePersist() {
        PersistableListener l = _listener;
       
        if(l != null) {
            try {
                l.beforePersist();
            } catch(Exception e) {
                _log.error("failure on calling beforePersist", e);
            }
        }
    }
View Full Code Here

   
    /**
     * Fire afterPersist events to the PersistableListener.
     */
    protected void fireAfterPersist() {
        PersistableListener l = _listener;
       
        if(l != null) {
            try {
                l.afterPersist();
            } catch(Exception e) {
                _log.error("failure on calling afterPersist", e);
            }
        }
    }
View Full Code Here

   
    /**
     * Initialize the Index persistable listener.
     */
    protected void initIndexPersistableListener() {
        _index.setPersistableListener(new PersistableListener() {
            @Override
            public void beforePersist() {
                try {
                    PersistableListener l = _listener;
                    if(l != null) l.beforePersist();
                } catch (Exception e) {
                    _logger.error("failed on calling beforePersist", e);
                }
               
                try {
                    _bytesDB.persist();
                } catch (Exception e) {
                    _logger.error("failed on calling beforePersist", e);
                }
            }
           
            @Override
            public void afterPersist() {
                try {
                    PersistableListener l = _listener;
                    if(l != null) l.afterPersist();
                } catch(Exception e) {
                    _logger.error("failed on calling afterPersist", e);
                }
            }
        });
View Full Code Here

TOP

Related Classes of krati.PersistableListener

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.