Package org.jboss.as.ejb3.cache

Examples of org.jboss.as.ejb3.cache.Identifiable


/*     */     {
/* 173 */       FileInputStream fis = FISAction.open(file);
/* 174 */       ObjectInputStream in = new JBossObjectInputStream(fis);
/*     */       try
/*     */       {
/* 177 */         Identifiable localIdentifiable = (Identifiable)in.readObject();
/*     */         return localIdentifiable;
/*     */       }
/*     */       finally
/*     */       {
/* 181 */         in.close();
View Full Code Here


/* 49 */     this.cache = new HashMap();
/*    */   }
/*    */
/*    */   public T create(Class<?>[] initTypes, Object[] initValues)
/*    */   {
/* 54 */     Identifiable obj = (Identifiable)this.factory.create(initTypes, initValues);
/* 55 */     synchronized (this.cache)
/*    */     {
/* 57 */       this.cache.put(obj.getId(), obj);
/*    */     }
/* 59 */     return obj;
/*    */   }
View Full Code Here

/*    */   }
/*    */
/*    */   public T get(Object key)
/*    */     throws NoSuchEJBException
/*    */   {
/*    */     Identifiable obj;
/* 65 */     synchronized (this.cache)
/*    */     {
/* 67 */       obj = (Identifiable)this.cache.get(key);
/*    */     }
/* 69 */     if (obj == null)
View Full Code Here

/*    */   {
/*    */   }
/*    */
/*    */   public void remove(Object key)
/*    */   {
/*    */     Identifiable obj;
/* 87 */     synchronized (this.cache)
/*    */     {
/* 89 */       obj = (Identifiable)this.cache.remove(key);
/*    */     }
/* 91 */     if (obj != null)
View Full Code Here

/*  67 */     this.cache = new HashMap();
/*     */   }
/*     */
/*     */   public T create(Class<?>[] initTypes, Object[] initValues)
/*     */   {
/*  72 */     Identifiable obj = (Identifiable)this.factory.create(initTypes, initValues);
/*  73 */     Entry entry = new Entry(obj);
/*  74 */     synchronized (this.cache)
/*     */     {
/*  76 */       this.cache.put(obj.getId(), entry);
/*     */     }
/*  78 */     return obj;
/*     */   }
View Full Code Here

/* 140 */     this.cache = new HashMap();
/*     */   }
/*     */
/*     */   protected SimplePassivatingCache<T>.Entry activate(Object key)
/*     */   {
/* 153 */     Identifiable obj = this.store.load(key);
/* 154 */     if (obj == null) {
/* 155 */       return null;
/*     */     }
/* 157 */     this.passivationManager.postActivate((Serializable)obj);
/*     */
View Full Code Here

/* 161 */     return entry;
/*     */   }
/*     */
/*     */   public T create(Class<?>[] initTypes, Object[] initValues)
/*     */   {
/* 166 */     Identifiable obj = (Identifiable)this.factory.create(initTypes, initValues);
/* 167 */     Entry entry = new Entry(obj);
/* 168 */     synchronized (this.cache)
/*     */     {
/* 170 */       this.cache.put(obj.getId(), entry);
/*     */     }
/* 172 */     return obj;
/*     */   }
View Full Code Here

/*     */     }
/*     */   }
/*     */
/*     */   public T create(Class<?>[] initTypes, Object[] initValues)
/*     */   {
/*  85 */     Identifiable obj = this.delegate.create(initTypes, initValues);
/*  86 */     Entry entry = new Entry(obj);
/*  87 */     synchronized (this.cache)
/*     */     {
/*  89 */       this.cache.put(obj.getId(), entry);
/*     */     }
/*  91 */     return obj;
/*     */   }
View Full Code Here

/*  96 */     synchronized (this.cache)
/*     */     {
/*  98 */       Entry entry = (Entry)this.cache.get(key);
/*  99 */       if (entry == null)
/*     */       {
/* 101 */         Identifiable obj = this.delegate.get(key);
/* 102 */         entry = new Entry(obj);
/* 103 */         this.cache.put(obj.getId(), entry);
/* 104 */         return obj;
/*     */       }
/* 106 */       if (entry.state != State.FINISHED)
/* 107 */         throw new IllegalStateException("entry " + entry + " is not finished");
/* 108 */       entry.state = State.IN_OPERATION;
View Full Code Here

/*     */       {
/* 121 */         GroupedPassivatingCacheImpl.log.trace("entry = " + entry);
/* 122 */         return entry;
/*     */       }
/*     */
/* 125 */       Identifiable obj = this.store.load(key);
/* 126 */       if (obj == null)
/* 127 */         return null;
/* 128 */       return new GroupedPassivatingCacheImpl.Entry(GroupedPassivatingCacheImpl.this, obj);
/*     */     }
View Full Code Here

TOP

Related Classes of org.jboss.as.ejb3.cache.Identifiable

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.