public SystemEventHelper() { systemEventInfoCache = new Cache<Class<? extends SystemEvent>, SystemEventInfo>( new Factory<Class<? extends SystemEvent>, SystemEventInfo>() { public SystemEventInfo newInstance(final Class<? extends SystemEvent> arg) throws InterruptedException { return new SystemEventInfo(arg); } } ); }
public SystemEventHelper() { systemEventInfoCache = new Cache<>(new Factory<Class<? extends SystemEvent>, SystemEventInfo>() { @Override public SystemEventInfo newInstance(final Class<? extends SystemEvent> arg) throws InterruptedException { return new SystemEventInfo(arg); } }); }
@Override public Cache<Class<? extends SystemEvent>, EventInfo> newInstance(final Class<?> sourceClass) throws InterruptedException { Factory<Class<? extends SystemEvent>, EventInfo> eventInfoFactory = new Factory<Class<? extends SystemEvent>, EventInfo>() { @Override public EventInfo newInstance(final Class<? extends SystemEvent> systemEventClass) throws InterruptedException { return new EventInfo(systemEventClass, sourceClass); } }; return new Cache<>(eventInfoFactory); } };
public Cache<Class<? extends SystemEvent>, EventInfo> newInstance( final Class<?> sourceClass) throws InterruptedException { Factory<Class<? extends SystemEvent>, EventInfo> eventInfoFactory = new Factory<Class<? extends SystemEvent>, EventInfo>() { public EventInfo newInstance(final Class<? extends SystemEvent> systemEventClass) throws InterruptedException { return new EventInfo(systemEventClass, sourceClass); } }; return new Cache<Class<? extends SystemEvent>, EventInfo>(eventInfoFactory); } };
public SystemEventHelper() { systemEventInfoCache = new Cache<>(new Factory<Class<? extends SystemEvent>, SystemEventInfo>() { @Override public SystemEventInfo newInstance(final Class<? extends SystemEvent> arg) throws InterruptedException { return new SystemEventInfo(arg); } }); }
@Override public Cache<Class<? extends SystemEvent>, EventInfo> newInstance(final Class<?> sourceClass) throws InterruptedException { Factory<Class<? extends SystemEvent>, EventInfo> eventInfoFactory = new Factory<Class<? extends SystemEvent>, EventInfo>() { @Override public EventInfo newInstance(final Class<? extends SystemEvent> systemEventClass) throws InterruptedException { return new EventInfo(systemEventClass, sourceClass); } }; return new Cache<>(eventInfoFactory); } };
public SystemEventHelper() { systemEventInfoCache = new Cache<>(new Factory<Class<? extends SystemEvent>, SystemEventInfo>() { @Override public SystemEventInfo newInstance(final Class<? extends SystemEvent> arg) throws InterruptedException { return new SystemEventInfo(arg); } }); }
@Override public Cache<Class<? extends SystemEvent>, EventInfo> newInstance(final Class<?> sourceClass) throws InterruptedException { Factory<Class<? extends SystemEvent>, EventInfo> eventInfoFactory = new Factory<Class<? extends SystemEvent>, EventInfo>() { @Override public EventInfo newInstance(final Class<? extends SystemEvent> systemEventClass) throws InterruptedException { return new EventInfo(systemEventClass, sourceClass); } }; return new Cache<>(eventInfoFactory); } };
public ComponentSystemEventHelper() { // Initialize the 'sources' cache for, ahem, readability... // ~generics++ Factory<Class<?>, Cache<Class<? extends SystemEvent>, EventInfo>> eventCacheFactory = new Factory<Class<?>, Cache<Class<? extends SystemEvent>, EventInfo>>() { @Override public Cache<Class<? extends SystemEvent>, EventInfo> newInstance(final Class<?> sourceClass) throws InterruptedException { Factory<Class<? extends SystemEvent>, EventInfo> eventInfoFactory = new Factory<Class<? extends SystemEvent>, EventInfo>() { @Override public EventInfo newInstance(final Class<? extends SystemEvent> systemEventClass) throws InterruptedException { return new EventInfo(systemEventClass, sourceClass); } }; return new Cache<>(eventInfoFactory); } }; sourceCache = new Cache<>(eventCacheFactory); }
public ComponentSystemEventHelper() { // Initialize the 'sources' cache for, ahem, readability... // ~generics++ Factory<Class<?>, Cache<Class<? extends SystemEvent>, EventInfo>> eventCacheFactory = new Factory<Class<?>, Cache<Class<? extends SystemEvent>, EventInfo>>() { @Override public Cache<Class<? extends SystemEvent>, EventInfo> newInstance(final Class<?> sourceClass) throws InterruptedException { Factory<Class<? extends SystemEvent>, EventInfo> eventInfoFactory = new Factory<Class<? extends SystemEvent>, EventInfo>() { @Override public EventInfo newInstance(final Class<? extends SystemEvent> systemEventClass) throws InterruptedException { return new EventInfo(systemEventClass, sourceClass); } }; return new Cache<>(eventInfoFactory); } }; sourceCache = new Cache<>(eventCacheFactory); }
public ComponentSystemEventHelper() { // Initialize the 'sources' cache for, ahem, readability... // ~generics++ Factory<Class<?>, Cache<Class<? extends SystemEvent>, EventInfo>> eventCacheFactory = new Factory<Class<?>, Cache<Class<? extends SystemEvent>, EventInfo>>() { public Cache<Class<? extends SystemEvent>, EventInfo> newInstance( final Class<?> sourceClass) throws InterruptedException { Factory<Class<? extends SystemEvent>, EventInfo> eventInfoFactory = new Factory<Class<? extends SystemEvent>, EventInfo>() { public EventInfo newInstance(final Class<? extends SystemEvent> systemEventClass) throws InterruptedException { return new EventInfo(systemEventClass, sourceClass); } }; return new Cache<Class<? extends SystemEvent>, EventInfo>(eventInfoFactory); } }; sourceCache = new Cache<Class<?>,Cache<Class<? extends SystemEvent>,EventInfo>>(eventCacheFactory); }
public ComponentSystemEventHelper() { // Initialize the 'sources' cache for, ahem, readability... // ~generics++ Factory<Class<?>, Cache<Class<? extends SystemEvent>, EventInfo>> eventCacheFactory = new Factory<Class<?>, Cache<Class<? extends SystemEvent>, EventInfo>>() { @Override public Cache<Class<? extends SystemEvent>, EventInfo> newInstance(final Class<?> sourceClass) throws InterruptedException { Factory<Class<? extends SystemEvent>, EventInfo> eventInfoFactory = new Factory<Class<? extends SystemEvent>, EventInfo>() { @Override public EventInfo newInstance(final Class<? extends SystemEvent> systemEventClass) throws InterruptedException { return new EventInfo(systemEventClass, sourceClass); } }; return new Cache<>(eventInfoFactory); } }; sourceCache = new Cache<>(eventCacheFactory); }
metadataCache = new Cache<Resource, BeanInfo>(new Factory<Resource, BeanInfo>() {
metadataCache = new Cache<>(new Factory<Resource, BeanInfo>() {
metadataCache = new Cache<>(new Factory<Resource, BeanInfo>() {
metadataCache = new Cache<>(new Factory<Resource, BeanInfo>() {
public final void init(Compiler compiler, ResourceResolver resolver, long refreshPeriod, FaceletCache cache) { Util.notNull("compiler", compiler); Util.notNull("resolver", resolver); this.compiler = compiler; this.cachePerContract = new ConcurrentHashMap<>(); this.resolver = resolver; this.baseUrl = resolver.resolveUrl("/"); this.idMappers = new Cache<>(new IdMapperFactory()); // this.location = url; refreshPeriod = (refreshPeriod >= 0) ? refreshPeriod * 1000 : -1; this.refreshPeriod = refreshPeriod; if (log.isLoggable(Level.FINE)) { log.log(Level.FINE, "Using ResourceResolver: {0}", resolver); log.log(Level.FINE, "Using Refresh Period: {0}", refreshPeriod); } // We can cast to the FaceletCache<DefaultFacelet> here because we know // that the Generics information is only used at compile time, and all cache // implementations will be using instance factories provided by us and returning DefaultFacelet this.cache = initCache((FaceletCache<DefaultFacelet>)cache); }
public final void init(Compiler compiler, ResourceResolver resolver, long refreshPeriod, FaceletCache cache) { Util.notNull("compiler", compiler); Util.notNull("resolver", resolver); this.compiler = compiler; this.cachePerContract = new ConcurrentHashMap<>(); this.resolver = resolver; this.baseUrl = resolver.resolveUrl("/"); this.idMappers = new Cache<>(new IdMapperFactory()); // this.location = url; refreshPeriod = (refreshPeriod >= 0) ? refreshPeriod * 1000 : -1; this.refreshPeriod = refreshPeriod; if (log.isLoggable(Level.FINE)) { log.log(Level.FINE, "Using ResourceResolver: {0}", resolver); log.log(Level.FINE, "Using Refresh Period: {0}", refreshPeriod); } // We can cast to the FaceletCache<DefaultFacelet> here because we know // that the Generics information is only used at compile time, and all cache // implementations will be using instance factories provided by us and returning DefaultFacelet this.cache = initCache((FaceletCache<DefaultFacelet>)cache); }
public final void init(Compiler compiler, ResourceResolver resolver, long refreshPeriod, FaceletCache cache) { Util.notNull("compiler", compiler); Util.notNull("resolver", resolver); this.compiler = compiler; this.cachePerContract = new ConcurrentHashMap<String, FaceletCache<DefaultFacelet>>(); this.resolver = resolver; this.baseUrl = resolver.resolveUrl("/"); this.idMappers = new Cache<String,IdMapper>(new IdMapperFactory()); // this.location = url; refreshPeriod = (refreshPeriod >= 0) ? refreshPeriod * 1000 : -1; this.refreshPeriod = refreshPeriod; if (log.isLoggable(Level.FINE)) { log.log(Level.FINE, "Using ResourceResolver: {0}", resolver); log.log(Level.FINE, "Using Refresh Period: {0}", refreshPeriod); } // We can cast to the FaceletCache<DefaultFacelet> here because we know // that the Generics information is only used at compile time, and all cache // implementations will be using instance factories provided by us and returning DefaultFacelet this.cache = initCache((FaceletCache<DefaultFacelet>)cache); }
public final void init(Compiler compiler, ResourceResolver resolver, long refreshPeriod, FaceletCache cache) { Util.notNull("compiler", compiler); Util.notNull("resolver", resolver); this.compiler = compiler; this.cachePerContract = new ConcurrentHashMap<>(); this.resolver = resolver; this.baseUrl = resolver.resolveUrl("/"); this.idMappers = new Cache<>(new IdMapperFactory()); // this.location = url; refreshPeriod = (refreshPeriod >= 0) ? refreshPeriod * 1000 : -1; this.refreshPeriod = refreshPeriod; if (log.isLoggable(Level.FINE)) { log.log(Level.FINE, "Using ResourceResolver: {0}", resolver); log.log(Level.FINE, "Using Refresh Period: {0}", refreshPeriod); } // We can cast to the FaceletCache<DefaultFacelet> here because we know // that the Generics information is only used at compile time, and all cache // implementations will be using instance factories provided by us and returning DefaultFacelet this.cache = initCache((FaceletCache<DefaultFacelet>)cache); }