use of com.dexels.navajo.resource.binarystore.BinaryStore in project navajo by Dexels.
the class BinaryStoreValue method evaluate.
@Override
public Object evaluate() {
String tenant = super.getInstance();
String resourceName = getStringOperand(0);
BinaryDigest binaryDigest = getBinaryDigestOperand(1);
BinaryStore os = BinaryStoreFactory.getInstance().getBinaryStore(resourceName, tenant);
return os.resolve(binaryDigest);
}
use of com.dexels.navajo.resource.binarystore.BinaryStore in project navajo by Dexels.
the class BinaryStoreAdapter method getResolve.
public Binary getResolve(BinaryDigest digest) {
logger.info("Getting: {} from resource: {} with tenant: {}", name, resource, tenant);
BinaryStore os = BinaryStoreFactory.getInstance().getBinaryStore(resource, tenant);
return os.resolve(digest);
}
use of com.dexels.navajo.resource.binarystore.BinaryStore in project navajo by Dexels.
the class BinaryStoreAdapter method store.
@Override
public void store() throws MappableException, UserException {
if (value != null) {
BinaryStore os = BinaryStoreFactory.getInstance().getBinaryStore(resource, tenant);
if (os == null) {
logger.warn("Can not find swift resource: {} for tenant: {}", resource, tenant);
throw new UserException(-1, "Can not find binary store resource");
}
os.store(this.value);
}
}
Aggregations