Package org.xmlBlaster.engine.msgstore

Examples of org.xmlBlaster.engine.msgstore.I_ChangeCallback


         boolean oldIsPersistent = oldEntry.isPersistent();
         if (callback != null) newEntry = callback.changeEntry(oldEntry);
         if (newEntry == null) return oldEntry;

         final I_MapEntry newEntryFinal = newEntry;
         I_MapEntry retEntry = this.transientStore.change(oldEntry, new I_ChangeCallback() {
            public final I_MapEntry changeEntry(I_MapEntry entry)
                  throws XmlBlasterException {
               return newEntryFinal;
            }
         });
        
         if (oldIsPersistent != retEntry.isPersistent()) {
            throw new XmlBlasterException(glob, ErrorCode.INTERNAL_NOTIMPLEMENTED, ME, "Changing of persistence flag of '" + oldEntry.getLogId() + "' to persistent=" + retEntry.isPersistent() + " is not implemented");
            // TODO: In case we changed the entry flag from persistent to transient it should be removed from the persistence.
         }
        
         if (newEntry.isPersistent()) {
            if (this.persistentStore != null && this.isConnected) {
               retEntry = this.persistentStore.change(oldEntry, new I_ChangeCallback() {
                  public final I_MapEntry changeEntry(I_MapEntry entry)
                        throws XmlBlasterException {
                     return newEntryFinal;
                  }
               });
View Full Code Here


         this.sessionStore.put(entry);
      }
      else {
         // session exists? -> update
         final long uniqueId = sessionInfo.getPersistenceUniqueId();
         this.sessionStore.change(uniqueId, new I_ChangeCallback() {
            public I_MapEntry changeEntry(I_MapEntry mapEntry)
                  throws XmlBlasterException {
               SessionEntry sessionEntry = new SessionEntry(connectQosData.toXml(), uniqueId, connectQosData.size(),
                     null);
               if (log.isLoggable(Level.FINE)) log.fine("changeSession (persistent) for uniqueId: '" + sessionEntry.getUniqueId() + "'");
View Full Code Here

TOP

Related Classes of org.xmlBlaster.engine.msgstore.I_ChangeCallback

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.