public static class ManagedResourceStorage.JsonStorage extends ManagedResourceStorage
ManagedResourceStorage.FileStorageIO, ManagedResourceStorage.InMemoryStorageIO, ManagedResourceStorage.JsonStorage, ManagedResourceStorage.StorageIO, ManagedResourceStorage.ZooKeeperStorageIO
loader, STORAGE_DIR_INIT_ARG, STORAGE_IO_CLASS_INIT_ARG, storageIO, UTF_8
Constructor and Description |
---|
JsonStorage(ManagedResourceStorage.StorageIO storageIO,
SolrResourceLoader loader) |
Modifier and Type | Method and Description |
---|---|
String |
getStoredResourceId(String resourceId)
Determines the relative path (from the storage root) for the given resource.
|
protected Object |
parseText(Reader reader,
String resourceId)
Called by
ManagedResourceStorage.load(String) to convert the
serialized resource into its in-memory representation. |
void |
store(String resourceId,
Object toStore)
Persists the given toStore object with the given resourceId.
|
delete, getResourceLoader, getStorageIO, load, newStorageIO
public JsonStorage(ManagedResourceStorage.StorageIO storageIO, SolrResourceLoader loader)
public String getStoredResourceId(String resourceId)
getStoredResourceId
in class ManagedResourceStorage
protected Object parseText(Reader reader, String resourceId) throws IOException
ManagedResourceStorage
ManagedResourceStorage.load(String)
to convert the
serialized resource into its in-memory representation.parseText
in class ManagedResourceStorage
IOException
public void store(String resourceId, Object toStore) throws IOException
ManagedResourceStorage
store
in class ManagedResourceStorage
IOException
Copyright © 2000-2019 Apache Software Foundation. All Rights Reserved.