/** * @param updateListenerHub * invoked, at intervals, to spur the process of detecting changes * @param checkInterval * interval, in milliseconds, between checks * @param updateTimeout * time, in milliseconds, to wait to obtain update lock. */ public CheckForUpdatesFilter(UpdateListenerHub updateListenerHub, @Symbol(SymbolConstants.FILE_CHECK_INTERVAL) @IntermediateType(TimeInterval.class) long checkInterval, @Symbol(SymbolConstants.FILE_CHECK_UPDATE_TIMEOUT) @IntermediateType(TimeInterval.class) long updateTimeout) { this.updateListenerHub = updateListenerHub; this.checkInterval = checkInterval; this.updateTimeout = updateTimeout; }
@Override @Advise(id = "id", serviceInterface = NonAnnotatedServiceInterface.class) public String execute2(@IntermediateType(String.class) final String t) { return null; }
/** * @param request * @param cookieSource * @param cookieSink * @param contextPath * @param defaultMaxAge * default cookie expiration time in milliseconds */ public CookiesImpl(Request request, CookieSource cookieSource, CookieSink cookieSink, @Symbol(SymbolConstants.CONTEXT_PATH) String contextPath, @Symbol("tapestry.default-cookie-max-age") @IntermediateType(TimeInterval.class) long defaultMaxAge) { this.request = request; this.cookieSource = cookieSource; this.cookieSink = cookieSink; this.defaultCookiePath = contextPath + "/"; this.defaultMaxAge = (int) (defaultMaxAge / 1000l); }
@Override @Advise(id = "id", serviceInterface = NonAnnotatedServiceInterface.class) public String execute2(@IntermediateType(String.class) String t, String s) { return null; }
@Advise(id = "right") public String duplicatedAnnotation(@IntermediateType(String.class) String parameter) { return null; }
@Override @Advise(id = "id", serviceInterface = NonAnnotatedServiceInterface.class) public String execute1(@IntermediateType(String.class) final int i) { return null; }
@Override @Advise(id = "id", serviceInterface = NonAnnotatedServiceInterface.class) public String execute3(@IntermediateType(String.class) int i) { return null; }
@Advise(id = "id", serviceInterface = NonAnnotatedServiceInterface.class) public String execute(@IntermediateType(String.class) int i);
@Advise(id = "wrong") public String duplicatedAnnotation(@IntermediateType(Object.class) String parameter);
@Override @Advise(id = "id", serviceInterface = NonAnnotatedServiceInterface.class) public String execute(@IntermediateType(String.class) int i) // annotation just for checking too { // a try/catch block, as it caused some troubles with proxy class generation try { System.out.println(); } catch (Exception e) { e.printStackTrace(); } return null; }
public static ParallelExecutor buildDeferredExecution(@Symbol(IOCSymbols.THREAD_POOL_CORE_SIZE) int coreSize, @Symbol(IOCSymbols.THREAD_POOL_MAX_SIZE) int maxSize, @Symbol(IOCSymbols.THREAD_POOL_KEEP_ALIVE) @IntermediateType(TimeInterval.class) int keepAliveMillis, @Symbol(IOCSymbols.THREAD_POOL_ENABLED) boolean threadPoolEnabled, @Symbol(IOCSymbols.THREAD_POOL_QUEUE_SIZE) int queueSize, PerthreadManager perthreadManager, RegistryShutdownHub shutdownHub, ThunkCreator thunkCreator) { if (!threadPoolEnabled) return new NonParallelExecutor(); LinkedBlockingQueue<Runnable> workQueue = new LinkedBlockingQueue<Runnable>(queueSize); final ThreadPoolExecutor executorService = new ThreadPoolExecutor(coreSize, maxSize, keepAliveMillis, TimeUnit.MILLISECONDS, workQueue); shutdownHub.addRegistryShutdownListener(new Runnable() { @Override public void run() { executorService.shutdown(); } }); return new ParallelExecutorImpl(executorService, thunkCreator, perthreadManager); }
public static ParallelExecutor buildDeferredExecution(@Symbol(IOCSymbols.THREAD_POOL_CORE_SIZE) int coreSize, @Symbol(IOCSymbols.THREAD_POOL_MAX_SIZE) int maxSize, @Symbol(IOCSymbols.THREAD_POOL_KEEP_ALIVE) @IntermediateType(TimeInterval.class) int keepAliveMillis, @Symbol(IOCSymbols.THREAD_POOL_ENABLED) boolean threadPoolEnabled, @Symbol(IOCSymbols.THREAD_POOL_QUEUE_SIZE) int queueSize, PerthreadManager perthreadManager, RegistryShutdownHub shutdownHub, ThunkCreator thunkCreator) { if (!threadPoolEnabled) return new NonParallelExecutor(); LinkedBlockingQueue<Runnable> workQueue = new LinkedBlockingQueue<Runnable>(queueSize); final ThreadPoolExecutor executorService = new ThreadPoolExecutor(coreSize, maxSize, keepAliveMillis, TimeUnit.MILLISECONDS, workQueue); shutdownHub.addRegistryShutdownListener(new Runnable() { @Override public void run() { executorService.shutdown(); } }); return new ParallelExecutorImpl(executorService, thunkCreator, perthreadManager); }