Examples of cache()


Examples of nexj.core.runtime.Instance.cache()

               return false;
            }

            instance = new Instance(metaclass, query.isLazy(), m_query.getInvocationContext());
            ref = instance.cache(oid);

            if (!bSkipInstance)
            {
               addInstance(instance, ref, metaclass, query, true);
            }
View Full Code Here

Examples of nexj.core.runtime.Instance.cache()

            Instance assoc = (assocRef == null) ? null : assocRef.getInstance();

            if (assoc == null)
            {
               assoc = new Instance(assocClass, true, m_query.getInvocationContext());
               assocRef = assoc.cache(oid);
            }

            if (bOverwrite || instance.getOldValueDirect(nOrdinal) == Undefined.VALUE)
            {
               instance.setOldValueDirect(nOrdinal, assoc);
View Full Code Here

Examples of nexj.core.runtime.Instance.cache()

         Instance instance = m_context.findInstance(query.getMetaclass(), oid);

         if (instance == null)
         {
            instance = new Instance(query.getMetaclass(), m_context);
            instance.cache(oid);
         }

         for (Iterator i = query.getFieldIterator(); i.hasNext(); )
         {
            Field field = (Field)i.next();
View Full Code Here

Examples of nexj.core.runtime.Instance.cache()

         else
         {
            if (instance == null)
            {
               instance = new Instance(metaclass, tobj.getVersion() < 0, m_context);
               m_context.getUnitOfWork().lock(instance.cache(oid), tobj.getEventName() != null);
            }
            else if ((m_nMode & CACHE) != 0 && instance.isCached())
            {
               return instance;
            }
View Full Code Here

Examples of nexj.core.runtime.Instance.cache()

                     valueArray[i] = key.getPartType(i).convert(valueArray[i]);
                  }
               }

               instance = new Instance(metaclass, m_context);
               m_context.getUnitOfWork().lock(instance.cache(oid), tobj.getEventName() != null);
            }
         }
      }

      m_identityMap.put(tobj, instance);
View Full Code Here

Examples of nexj.core.runtime.Instance.cache()

      Instance principal = m_context.findInstance(metaclass, oid);

      if (principal == null)
      {
         principal = new Instance(metaclass, m_context);
         principal.cache(oid);
      }

      Instance contact = new Instance(getMetadata().getMetaclass("Contact"), Instance.NEW, m_context);

      contact.setValue("firstName", FIRST_NAME);
View Full Code Here

Examples of nexj.core.runtime.Instance.cache()

               instance = context.findInstance(metaclass, oid);

               if (instance == null)
               {
                  instance = new Instance(metaclass, context);
                  instance.cache(oid);
               }
            }
            else
            {
               instance = new Instance(metaclass, context);
View Full Code Here

Examples of nexj.core.runtime.Instance.cache()

      Query query;

      // Lazy association type adjustment
      Instance instance = new Instance(getMetadata().getMetaclass("Principal"), true, m_context);

      instance.cache(new OID(new Object[]{Binary.parse("00000000000000000000000000000002")}));
      query = Query.createRead(getMetadata().getMetaclass("UserGroupAssoc"), parse("(user)"),
         parse("(= (@) (oid #z00000000000000000000000000000003))"),
         null, -1, 0, false, Query.SEC_NONE, m_context);
      assertEquals("User", ((Instance)query.read().getInstance(0).getValue("user")).getLazyMetaclass().getName());
      m_context.removeInstance(instance);
View Full Code Here

Examples of org.apache.hadoop.hive.ql.exec.ObjectCache.cache()

    ObjectCache cache = ObjectCacheFactory.getCache(jc);
    ReduceWork gWork = (ReduceWork) cache.retrieve(PLAN_KEY);
    if (gWork == null) {
      gWork = Utilities.getReduceWork(job);
      cache.cache(PLAN_KEY, gWork);
    } else {
      Utilities.setReduceWork(job, gWork);
    }

    reducer = gWork.getReducer();
View Full Code Here

Examples of org.apache.hadoop.hive.ql.exec.ObjectCache.cache()

      execContext.setJc(jc);
      // create map and fetch operators
      MapWork mrwork = (MapWork) cache.retrieve(PLAN_KEY);
      if (mrwork == null) {
        mrwork = Utilities.getMapWork(job);
        cache.cache(PLAN_KEY, mrwork);
      } else {
        Utilities.setMapWork(job, mrwork);
      }
      if (mrwork.getVectorMode()) {
        mo = new VectorMapOperator();
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.