blob: 35b4e7c759e9480dca5b7ac74ebec2aed4ff2a73 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.jdisc.refcount;
import com.yahoo.jdisc.ResourceReference;
/**
* Interface for implementations of reference counting
* @author baldersheim
*/
public interface References {
/** Release the initial reference */
void release();
/** Returns number of held references */
int referenceCount();
/**
* Adds a reference and return an objects that when closed will return the reference.
* Supply a context that can provide link to the one holding the link. Useful for debugging
*/
ResourceReference refer(Object context);
String currentState();
}
|