1 /*******************************************************************************
2 * Copyright (c) 2007, 2010 Association for Decentralized Information Management
4 * All rights reserved. This program and the accompanying materials
5 * are made available under the terms of the Eclipse Public License v1.0
6 * which accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
10 * VTT Technical Research Centre of Finland - initial API and implementation
11 *******************************************************************************/
12 package org.simantics.db.common.procedure.adapter;
14 import org.simantics.db.procedure.Listener;
17 * Use this listener to ensure caching for a request. This listener will not lock the request in cache.
20 public class TransientCacheListener<T> implements Listener<T> {
22 @SuppressWarnings("rawtypes")
23 private static TransientCacheListener INSTANCE = new TransientCacheListener();
25 @SuppressWarnings("unchecked")
26 public static <T> TransientCacheListener<T> instance() {
27 return (TransientCacheListener<T>) INSTANCE;
31 public final boolean isDisposed() {
36 public int hashCode() {
37 return TransientCacheListener.class.hashCode();
41 public boolean equals(Object other) {
42 return other instanceof TransientCacheListener<?>;
46 public void execute(T result) {
50 public void exception(Throwable t) {