com.maxifier.mxcache.transform.SmartWeakReference 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.HashWeakReference;
/**
* @author Alexander Kochurov ([email protected])
*/
class SmartWeakReference extends HashWeakReference implements SmartReference {
private Runnable callback;
@SuppressWarnings({ "unchecked" })
public SmartWeakReference(T referent) {
super(referent, SmartReferenceManager.getReferenceQueue());
}
@Override
public Runnable getCallback() {
return callback;
}
@Override
public void setCallback(Runnable callback) {
this.callback = callback;
}
}