Examples of CacheModule


Examples of com.google.gerrit.server.cache.CacheModule

  private static final String BYID_NAME = "accounts";
  private static final String BYUSER_NAME = "accounts_byname";

  public static Module module() {
    return new CacheModule() {
      @Override
      protected void configure() {
        cache(BYID_NAME, Account.Id.class, AccountState.class)
          .loader(ByIdLoader.class);
View Full Code Here

Examples of com.google.gerrit.server.cache.CacheModule

public class PatchListCacheImpl implements PatchListCache {
  private static final String FILE_NAME = "diff";
  static final String INTRA_NAME = "diff_intraline";

  public static Module module() {
    return new CacheModule() {
      @Override
      protected void configure() {
        persist(FILE_NAME, PatchListKey.class, PatchList.class)
            .maximumWeight(10 << 20)
            .loader(PatchListLoader.class)
View Full Code Here

Examples of com.google.gerrit.server.cache.CacheModule

  private static final Logger log = LoggerFactory
      .getLogger(GroupIncludeCacheImpl.class);
  private static final String BYINCLUDE_NAME = "groups_byinclude";

  public static Module module() {
    return new CacheModule() {
      @Override
      protected void configure() {
        cache(BYINCLUDE_NAME,
            AccountGroup.UUID.class,
            new TypeLiteral<Set<AccountGroup.UUID>>() {})
View Full Code Here

Examples of com.google.gerrit.server.cache.CacheModule

  private static final Logger log = LoggerFactory
      .getLogger(AccountByEmailCacheImpl.class);
  private static final String CACHE_NAME = "accounts_byemail";

  public static Module module() {
    return new CacheModule() {
      @Override
      protected void configure() {
        cache(CACHE_NAME,
            String.class,
            new TypeLiteral<Set<Account.Id>>() {})
View Full Code Here

Examples of com.google.gerrit.server.cache.CacheModule

  private static final String CACHE_NAME = "projects";
  private static final String CACHE_LIST = "project_list";

  public static Module module() {
    return new CacheModule() {
      @Override
      protected void configure() {
        cache(CACHE_NAME, String.class, ProjectState.class)
          .loader(Loader.class);
View Full Code Here

Examples of com.google.gerrit.server.cache.CacheModule

  static final Iterable<SshKeyCacheEntry> NO_SUCH_USER = none();
  static final Iterable<SshKeyCacheEntry> NO_KEYS = none();

  public static Module module() {
    return new CacheModule() {
      @Override
      protected void configure() {
        cache(CACHE_NAME,
            String.class,
            new TypeLiteral<Iterable<SshKeyCacheEntry>>(){})
View Full Code Here

Examples of com.google.gerrit.server.cache.CacheModule

@Singleton
public class TagCache {
  private static final String CACHE_NAME = "git_tags";

  public static Module module() {
    return new CacheModule() {
      @Override
      protected void configure() {
        persist(CACHE_NAME, String.class, EntryVal.class);
        bind(TagCache.class);
      }
View Full Code Here

Examples of com.google.gerrit.server.cache.CacheModule

      bind(Resolver.class);
      bind(UploadFactory.class);
      bind(UploadFilter.class);
      bind(ReceiveFactory.class);
      bind(ReceiveFilter.class);
      install(new CacheModule() {
        @Override
        protected void configure() {
          cache(ID_CACHE,
              AdvertisedObjectsCacheKey.class,
              new TypeLiteral<Set<ObjectId>>() {})
View Full Code Here

Examples of com.google.gerrit.server.cache.CacheModule

public final class CacheBasedWebSession implements WebSession {
  private static final String ACCOUNT_COOKIE = "GerritAccount";
  static final long MAX_AGE_MINUTES = HOURS.toMinutes(12);

  public static Module module() {
    return new CacheModule() {
      @Override
      protected void configure() {
        persist(WebSessionManager.CACHE_NAME, String.class, Val.class)
            .maximumWeight(1024) // reasonable default for many sites
            .expireAfterWrite(MAX_AGE_MINUTES, MINUTES) // expire sessions if they are inactive
View Full Code Here

Examples of net.csdn.modules.cache.CacheModule

        moduleList.add(new ScanModule());
        moduleList.add(new SystemLoggerModule());
        moduleList.add(new ControllerModule());
        boolean disableRedis = settings.getAsBoolean(ServiceFramwork.mode + ".datasources.redis.disable", false);
        if (!disableRedis) {
            moduleList.add(new CacheModule());
        }
        moduleList.add(new AppCacheModule());
        boolean disableMysql = settings.getAsBoolean(ServiceFramwork.mode + ".datasources.mysql.disable", false);

        if (!disableMysql) {
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.