Package org.springframework.data.gemfire

Examples of org.springframework.data.gemfire.GemfireTemplate$RegionCloseSuppressingInvocationHandler


  @Around("execution(* org.springframework.data.gemfire.GemfireOperations.find(..)) " +
    "|| execution(* org.springframework.data.gemfire.GemfireOperations.findUnique(..)) " +
    "|| execution(* org.springframework.data.gemfire.GemfireOperations.query(..))")
  public Object templateQuery(ProceedingJoinPoint pjp) {
    GemfireTemplate template = (GemfireTemplate) pjp.getTarget();
    boolean jsonRegion = isIncludedSONRegion(template.getRegion());
    Object returnValue = null;

    try {
      if (jsonRegion) {
        returnValue = pjp.proceed();
View Full Code Here


   * @return a new GemfireTemplate instance configured with the given GemFire Cache Region.
   * @see com.gemstone.gemfire.cache.Region
   * @see #setRegion
   */
  protected GemfireOperations createGemfireTemplate(Region<?, ?> region) {
    return new GemfireTemplate(region);
  }
View Full Code Here

    oliverAugust = new Person(7L, "Oliver August", "Matthews");

    GemfireMappingContext context = new GemfireMappingContext();

    Regions regions = new Regions(this.regions, context);
    GemfireTemplate template = new GemfireTemplate(regions.getRegion(Person.class));

    template.put(dave.id, dave);
    template.put(carter.id, carter);
    template.put(boyd.id, boyd);
    template.put(stefan.id, stefan);
    template.put(leroi.id, leroi);
    template.put(jeff.id, jeff);
    template.put(oliverAugust.id, oliverAugust);

    repository = getRepository(regions);
  }
View Full Code Here

    animal.setId(id);
    return animal;
  }

  protected GemfireTemplate createGemfireTemplate(final Region<?, ?> region) {
    return new GemfireTemplate(region);
  }
View Full Code Here

   */
  @Override
  @SuppressWarnings({ "rawtypes", "unchecked" })
  protected Object getTargetRepository(RepositoryMetadata metadata) {
    GemfireEntityInformation<?, Serializable> entityInformation = getEntityInformation(metadata.getDomainType());
    GemfireTemplate gemfireTemplate = getTemplate(metadata);
    return new SimpleGemfireRepository(gemfireTemplate, entityInformation);
  }
View Full Code Here

      Assert.isTrue(regionKeyType.isAssignableFrom(entityIdType), String.format(
        "The region referenced only supports keys of type %s but the entity to be stored has an id of type %s!",
          regionKeyType, entityIdType));
    }

    return new GemfireTemplate(region);
  }
View Full Code Here

  protected QueryLookupStrategy getQueryLookupStrategy(Key key) {
    return new QueryLookupStrategy() {
      @Override
      public RepositoryQuery resolveQuery(Method method, RepositoryMetadata metadata, NamedQueries namedQueries) {
        GemfireQueryMethod queryMethod = new GemfireQueryMethod(method, metadata, context);
        GemfireTemplate template = getTemplate(metadata);

        if (queryMethod.hasAnnotatedQuery()) {
          return new StringBasedGemfireRepositoryQuery(queryMethod, template).asUserDefinedQuery();
        }
View Full Code Here

      protected void initDao() {
        flag.set(true);
      }
    };

    GemfireOperations expectedTemplate = new GemfireTemplate();

    dao.setGemfireTemplate(expectedTemplate);
    dao.afterPropertiesSet();

    assertNotNull("template not created", dao.getGemfireTemplate());
View Full Code Here

TOP

Related Classes of org.springframework.data.gemfire.GemfireTemplate$RegionCloseSuppressingInvocationHandler

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.