com.maxifier.mxcache.transform.SmartSoftReference Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of mxcache-runtime Show documentation
Show all versions of mxcache-runtime Show documentation
Constains all classes necessary for launching a MxCache-instrumentated application
/*
* Copyright (c) 2008-2014 Maxifier Ltd. All Rights Reserved.
*/
package com.maxifier.mxcache.transform;
import com.maxifier.mxcache.util.HashSoftReference;
/**
* @author Alexander Kochurov ([email protected])
*/
class SmartSoftReference extends HashSoftReference implements SmartReference {
private Runnable callback;
@SuppressWarnings({ "unchecked" })
public SmartSoftReference(T referent) {
super(referent, SmartReferenceManager.getReferenceQueue());
}
@Override
public Runnable getCallback() {
return callback;
}
@Override
public void setCallback(Runnable callback) {
this.callback = callback;
}
}