Examples of CacheInfo


Examples of com.asakusafw.thundergate.runtime.cache.CacheInfo

        bean.setTargetTable(targetTable);
        ImportProtocolDecide service = new ImportProtocolDecide() {
            @Override
            protected Map<String, CacheInfo> collectRemoteCacheInfo(ImportBean _)
                    throws BulkLoaderSystemException {
                return Collections.singletonMap("tb1", new CacheInfo(
                        CacheInfo.FEATURE_VERSION,
                        tb1.getCacheId(),
                        offset(-1),
                        "__TG_TEST1",
                        tb1.getImportTargetColumns(),
View Full Code Here

Examples of com.asakusafw.thundergate.runtime.cache.CacheInfo

        bean.setTargetTable(targetTable);
        ImportProtocolDecide service = new ImportProtocolDecide() {
            @Override
            protected Map<String, CacheInfo> collectRemoteCacheInfo(ImportBean _)
                    throws BulkLoaderSystemException {
                return Collections.singletonMap("tb1", new CacheInfo(
                        CacheInfo.FEATURE_VERSION + "+",
                        tb1.getCacheId(),
                        offset(-1),
                        "__TG_TEST1",
                        tb1.getImportTargetColumns(),
View Full Code Here

Examples of com.asakusafw.thundergate.runtime.cache.CacheInfo

        bean.setTargetTable(targetTable);
        ImportProtocolDecide service = new ImportProtocolDecide() {
            @Override
            protected Map<String, CacheInfo> collectRemoteCacheInfo(ImportBean _)
                    throws BulkLoaderSystemException {
                return Collections.singletonMap("tb1", new CacheInfo(
                        CacheInfo.FEATURE_VERSION,
                        tb1.getCacheId(),
                        offset(-1),
                        "__TG_TEST1",
                        tb1.getImportTargetColumns(),
View Full Code Here

Examples of com.asakusafw.thundergate.runtime.cache.CacheInfo

        service.execute(bean);

        assertThat(tb1.getImportProtocol().getKind(), is(FileProtocol.Kind.CREATE_CACHE));
        assertThat(tb1.getImportProtocol().getLocation(), is(tb1.getDfsFilePath()));
        assertThat(tb1.getStartTimestamp(), is(nullValue()));
        CacheInfo info = tb1.getImportProtocol().getInfo();
        assertThat(info, is(notNullValue()));

        assertThat(info.getId(), is("tb1"));
        assertThat(info.getFeatureVersion(), is(CacheInfo.FEATURE_VERSION));
        assertThat(info.getTimestamp(), is(not(nullValue())));
        assertThat(info.getTableName(), is("__TG_TEST1"));
        assertThat(info.getColumnNames(), is((Object) new HashSet<String>(tb1.getImportTargetColumns())));
        assertThat(info.getModelClassName(), is(ImportTarget1.class.getName()));
        assertThat(info.getModelClassVersion(), is(new ImportTarget1().__tgc__DataModelVersion()));
    }
View Full Code Here

Examples of com.asakusafw.thundergate.runtime.cache.CacheInfo

        bean.setTargetTable(targetTable);
        ImportProtocolDecide service = new ImportProtocolDecide() {
            @Override
            protected Map<String, CacheInfo> collectRemoteCacheInfo(ImportBean _)
                    throws BulkLoaderSystemException {
                return Collections.singletonMap("tb1", new CacheInfo(
                        CacheInfo.FEATURE_VERSION,
                        tb1.getCacheId(),
                        offset(-1),
                        "__TG_TEST1",
                        tb1.getImportTargetColumns(),
                        tb1.getImportTargetType().getName(),
                        new ImportTarget1().__tgc__DataModelVersion()));
            }
        };
        service.execute(bean);

        assertThat(tb1.getImportProtocol().getKind(), is(FileProtocol.Kind.UPDATE_CACHE));
        assertThat(tb1.getImportProtocol().getLocation(), is(tb1.getDfsFilePath()));
        assertThat(tb1.getStartTimestamp(), is(notNullValue()));
        CacheInfo info = tb1.getImportProtocol().getInfo();
        assertThat(info, is(notNullValue()));

        assertThat(info.getId(), is("tb1"));
        assertThat(info.getFeatureVersion(), is(CacheInfo.FEATURE_VERSION));
        assertThat(info.getTimestamp(), is(not(nullValue())));
        assertThat(info.getTableName(), is("__TG_TEST1"));
        assertThat(info.getColumnNames(), is((Object) new HashSet<String>(tb1.getImportTargetColumns())));
        assertThat(info.getModelClassName(), is(ImportTarget1.class.getName()));
        assertThat(info.getModelClassVersion(), is(new ImportTarget1().__tgc__DataModelVersion()));
    }
View Full Code Here

Examples of com.dotmarketing.business.mbeans.CacheInfo

      MBeanServer server = ManagementFactory.getPlatformMBeanServer();
      ObjectName on = new ObjectName("jboss.cache:service=TreeCache");
      server.registerMBean(wrapper, on);
     
      on = new ObjectName("org.dotcms:type=CacheInfo");
      CacheInfoMBean infoBean=new CacheInfo(this);
      server.registerMBean(infoBean, on);
     
    } catch (MalformedObjectNameException e) {
      Logger.debug(DotJBCacheAdministratorImpl.class,"MalformedObjectNameException: " + e.getMessage(),e);
    } catch (InstanceAlreadyExistsException e) {
View Full Code Here

Examples of org.cruxframework.crux.core.server.rest.core.dispatch.CacheInfo

  private boolean ensureReaderMethod(List<RestMethodRegistrationInfo> methods)
    {
    for (RestMethodRegistrationInfo methodInfo : methods)
        {
      CacheInfo cacheInfo = HttpMethodHelper.getCacheInfoForGET(methodInfo.invoker.getMethod());
      if (cacheInfo != null)
      {
        if (!cacheInfo.isCacheEnabled())
        {
          //for cacheable resources, eTag generation is already enabled.
          methodInfo.invoker.forceEtagGeneration();
        }
        return true;
View Full Code Here

Examples of org.cruxframework.crux.core.server.rest.core.dispatch.CacheInfo

    {
      writeConditionalResponse(response, methodReturn, outputHeaders);
    }
    else
    {
      CacheInfo cacheInfo = methodReturn.getCacheInfo();
      if (cacheInfo != null)
      {
        writeCacheHeaders(response, cacheInfo, methodReturn.getEtag(), methodReturn.getDateModified(), methodReturn.isEtagGenerationEnabled());
      }
View Full Code Here

Examples of org.cruxframework.crux.core.server.rest.core.dispatch.CacheInfo

    ConditionalResponse conditionalResponse = methodReturn.getConditionalResponse();
    response.setStatus(conditionalResponse.getStatus());

    EntityTag etag = conditionalResponse.getEtag();
    long dateModified = conditionalResponse.getLastModified();
    CacheInfo cacheInfo = methodReturn.getCacheInfo();

    if (cacheInfo != null)
    {
      writeCacheHeaders(response, cacheInfo, etag, dateModified, methodReturn.isEtagGenerationEnabled());
    }
View Full Code Here

Examples of org.gatein.pc.api.info.CacheInfo

            cacheControl.getETag());
      }
      else
      {
         PortletInfo info = preq.container.getInfo();
         CacheInfo cacheInfo = info.getCache();
         cc = new org.gatein.pc.api.cache.CacheControl(cacheInfo.getExpirationSecs(), CacheScope.PRIVATE, null);
      }

      //
      if (cacheControl != null && cacheControl.useCachedContent())
      {
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.