public class VanillaAsset extends Object implements Asset, net.openhft.chronicle.core.io.Closeable
| Modifier and Type | Field and Description |
|---|---|
static Comparator<Class> |
CLASS_COMPARATOR |
| Constructor and Description |
|---|
VanillaAsset(Asset asset,
String name) |
| Modifier and Type | Method and Description |
|---|---|
Asset |
acquireAsset(RequestContext context,
String fullName) |
<V> V |
acquireView(Class<V> viewType,
RequestContext rc) |
<L> void |
addLeafRule(Class<L> iClass,
String description,
LeafViewFactory<L> factory) |
<V> V |
addView(Class<V> viewType,
V view) |
<W,U> void |
addWrappingRule(Class<W> iClass,
String description,
java.util.function.BiPredicate<RequestContext,Asset> predicate,
WrappingViewFactory<W,U> factory,
Class<U> underlyingType) |
<W,U> void |
addWrappingRule(Class<W> iClass,
String description,
WrappingViewFactory<W,U> factory,
Class<U> underlyingType) |
void |
close() |
protected Asset |
createAsset(RequestContext context,
String name) |
<I> I |
createLeafView(Class viewType,
RequestContext rc,
Asset asset) |
<I,U> I |
createWrappingView(Class viewType,
RequestContext rc,
Asset asset,
U underling) |
void |
enableTranslatingValuesToBytesStore() |
void |
forEachChild(net.openhft.chronicle.core.util.ThrowingAcceptor<Asset,InvalidSubscriberException> consumer) |
void |
forRemoteAccess(String hostname,
int port) |
void |
forTesting() |
void |
forTesting(boolean daemon) |
Asset |
getChild(String name) |
<V> V |
getView(Class<V> vClass) |
boolean |
hasChildren() |
<V> boolean |
hasFactoryFor(Class<V> viewType) |
boolean |
isReadOnly() |
boolean |
isSubAsset() |
String |
name() |
Asset |
parent() |
<I> void |
registerView(Class<I> viewType,
I view) |
void |
removeChild(String name) |
void |
standardStack(boolean daemon) |
Subscription |
subscription(boolean createIfAbsent) |
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitacquireView, findAsset, findOrCreateView, findView, fullName, getAsset, rootpublic static final Comparator<Class> CLASS_COMPARATOR
public void standardStack(boolean daemon)
public void forTesting()
public void forTesting(boolean daemon)
public void forRemoteAccess(String hostname, int port)
public void enableTranslatingValuesToBytesStore()
public <W,U> void addWrappingRule(Class<W> iClass, String description, java.util.function.BiPredicate<RequestContext,Asset> predicate, WrappingViewFactory<W,U> factory, Class<U> underlyingType)
addWrappingRule in interface Assetpublic <W,U> void addWrappingRule(Class<W> iClass, String description, WrappingViewFactory<W,U> factory, Class<U> underlyingType)
addWrappingRule in interface Assetpublic <L> void addLeafRule(Class<L> iClass, String description, LeafViewFactory<L> factory)
addLeafRule in interface Assetpublic <I,U> I createWrappingView(Class viewType, RequestContext rc, Asset asset, U underling) throws AssetNotFoundException
createWrappingView in interface AssetAssetNotFoundExceptionpublic <I> I createLeafView(Class viewType, RequestContext rc, Asset asset) throws AssetNotFoundException
createLeafView in interface AssetAssetNotFoundExceptionpublic boolean isSubAsset()
isSubAsset in interface Assetpublic boolean hasChildren()
hasChildren in interface Assetpublic void forEachChild(net.openhft.chronicle.core.util.ThrowingAcceptor<Asset,InvalidSubscriberException> consumer) throws InvalidSubscriberException
forEachChild in interface AssetInvalidSubscriberException@Nullable
public <V> V getView(@NotNull
Class<V> vClass)
public boolean isReadOnly()
isReadOnly in interface Asset@NotNull
public <V> V acquireView(@NotNull
Class<V> viewType,
RequestContext rc)
throws AssetNotFoundException
acquireView in interface AssetAssetNotFoundExceptionpublic <I> void registerView(Class<I> viewType, I view)
registerView in interface Asset@NotNull public Subscription subscription(boolean createIfAbsent) throws AssetNotFoundException
subscription in interface AssetAssetNotFoundExceptionpublic void close()
close in interface Closeableclose in interface AutoCloseable@NotNull public Asset acquireAsset(RequestContext context, @NotNull String fullName) throws AssetNotFoundException
acquireAsset in interface AssetAssetNotFoundExceptionpublic <V> boolean hasFactoryFor(Class<V> viewType)
hasFactoryFor in interface Asset@Nullable protected Asset createAsset(RequestContext context, @NotNull String name)
public void removeChild(String name)
removeChild in interface AssetCopyright © 2015. All rights reserved.