Examples of Identifiable


Examples of org.jboss.ejb3.cache.Identifiable

/*    */   {
/*    */   }
/*    */
/*    */   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

Examples of org.jboss.ejb3.cache.Identifiable

/*  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

Examples of org.jboss.ejb3.cache.Identifiable

/* 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

Examples of org.jboss.ejb3.cache.Identifiable

/* 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

Examples of org.jboss.ejb3.cache.Identifiable

/*     */     }
/*     */   }
/*     */
/*     */   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

Examples of org.jboss.ejb3.cache.Identifiable

/*  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

Examples of org.jboss.ejb3.cache.Identifiable

/*     */       {
/* 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

Examples of org.moltools.lib.Identifiable

    if (userEntries == null) return false;
    for (Iterator<KeyValue> i = userEntries.iterator();i.hasNext();) {
      KeyValue kv = i.next();
      String userID = (String) kv.getKey();
      for (Iterator<?> groupit = group.getMembers().iterator(); groupit.hasNext(); ) {
        Identifiable other = (Identifiable) groupit.next();
        if (other.getID().equals(userID)) {
          ingroup = true;
        }
      }
    }
    return ingroup;
View Full Code Here

Examples of org.nanocontainer.aop.Identifiable

        assertEquals(before, log.toString());
    }

    private void verifyMixin(Object component) {
        assertTrue(component instanceof Identifiable);
        Identifiable identifiable = (Identifiable) component;
        identifiable.setId("id");
        assertEquals("id", identifiable.getId());
    }
View Full Code Here

Examples of org.nanocontainer.aop.Identifiable

        pico.registerComponentImplementation("order2", OrderEntityImpl.class);

        // register mixin dependency:
        pico.registerComponentImplementation(IdGenerator.class, IdGeneratorImpl.class);

        Identifiable order1 = (Identifiable) pico.getComponentInstance("order1");
        Identifiable order2 = (Identifiable) pico.getComponentInstance("order2");

        assertEquals(new Integer(1), order1.getId());
        assertEquals(new Integer(2), order2.getId());

        // order1 and order2 do NOT share the same mixin instance (usually a
        // good thing),
        // although their mixin instances do share the same IdGenerator
        order1.setId(new Integer(42));
        assertEquals(new Integer(42), order1.getId());
        assertEquals(new Integer(2), order2.getId());
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.