Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
**
* Trusted API reading, writing and searching for objects in the TRAC metadata store.
* This API is only available to other components of the TRAC platform, it is
* not exposed to clients via the platform gateway.
* Most of the calls in this interface are identical to their public equivalents.
* Extra calls are available for pre-allocating objects, a facility which is not
* available to clients of the platform. Restrictions on the creation of certain
* object types and manipulation of controlled tag attributes are lifted. Methods
* for performing HTTP GET requests of RESTFUL resources are not duplicated.
* @see TracMetadataApi
*
**
* Trusted API reading, writing and searching for objects in the TRAC metadata store.
* This API is only available to other components of the TRAC platform, it is
* not exposed to clients via the platform gateway.
* Most of the calls in this interface are identical to their public equivalents.
* Extra calls are available for pre-allocating objects, a facility which is not
* available to clients of the platform. Restrictions on the creation of certain
* object types and manipulation of controlled tag attributes are lifted. Methods
* for performing HTTP GET requests of RESTFUL resources are not duplicated.
* @see TracMetadataApi
*
*/
public interface AsyncService {
/**
*
**
* Create a new object in the TRAC metadata store.
* This call behaves identically to the equivalent public API call, without the
* restriction on which types of object can be saved.
* @see TracMetadataApi.createObject()
*
**
* Update an existing object in the TRAC metadata store.
* This call behaves identically to the equivalent public API call, however it
* can be used with any type of object that supports versioning (currently DATA
* and CUSTOM).
* @see TracMetadataApi.updateObject()
*
**
* Update the tag for an existing object in the TRAC metadata store.
* This call behaves identically to the equivalent public API call.
* @see TracMetadataApi.updateTag()
*
**
* Preallocate an object ID for an object that will be created later.
* This call is for use by TRAC components that need to reserve an ID before
* it is used, particularly if the object ID must be included in the definition
* of an object that has not been created yet. When creating an ID the tenant
* and object type must be specified, the object that is eventually saved must
* match these two conditions. Orphan IDs are expected - if a component request
* an ID and encounters an error before that ID is used, the orphan ID is just
* ignored.
*
**
* Create an object using an ID that was previously preallocated.
* This call behaves essentially the same as createObject(), with all the
* same validation. The only difference is that the new definition must be
* supplied with an object header, including the object ID returned from a
* prior call to preallocateId().
* Error conditions include all the error conditions for createObject().
* Using a preallocated ID twice, attempting to save to an unknown ID or the
* ID of another object that already exists are also errors.
*
**
* Perform a batch of write operations on the TRAC metadata store.
* This call behaves similarly to the equivalent public API call. However,
* the createObject, updateObject and updateTag request types take their
* semantics from the trusted API instead of the public one. It is also
* possible to include preallocateId and createPreallocatedObject in the
* batch request.
* @see TracMetadataApi.writeBatch()
*
**
* Read a single object from the TRAC metadata store using a tag selector.
* This call behaves identically to the equivalent public API call.
* @see TracMetadataApi.readObject()
*
**
* Read multiple objects from the TRAC metadata store using tag selectors.
* This call behaves identically to the equivalent public API call.
* @see TracMetadataApi.readBatch()
*
**
* Perform a search against the TRAC metadata store.
* This call behaves identically to the equivalent public API call.
* @see TracMetadataApi.search()
*
*/
default void search(org.finos.tracdap.api.MetadataSearchRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSearchMethod(), responseObserver);
}
}
/**
* Base class for the server implementation of the service TrustedMetadataApi.
*
**
* Trusted API reading, writing and searching for objects in the TRAC metadata store.
* This API is only available to other components of the TRAC platform, it is
* not exposed to clients via the platform gateway.
* Most of the calls in this interface are identical to their public equivalents.
* Extra calls are available for pre-allocating objects, a facility which is not
* available to clients of the platform. Restrictions on the creation of certain
* object types and manipulation of controlled tag attributes are lifted. Methods
* for performing HTTP GET requests of RESTFUL resources are not duplicated.
* @see TracMetadataApi
*
*/
public static abstract class TrustedMetadataApiImplBase
implements io.grpc.BindableService, AsyncService {
@java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
return TrustedMetadataApiGrpc.bindService(this);
}
}
/**
* A stub to allow clients to do asynchronous rpc calls to service TrustedMetadataApi.
*
**
* Trusted API reading, writing and searching for objects in the TRAC metadata store.
* This API is only available to other components of the TRAC platform, it is
* not exposed to clients via the platform gateway.
* Most of the calls in this interface are identical to their public equivalents.
* Extra calls are available for pre-allocating objects, a facility which is not
* available to clients of the platform. Restrictions on the creation of certain
* object types and manipulation of controlled tag attributes are lifted. Methods
* for performing HTTP GET requests of RESTFUL resources are not duplicated.
* @see TracMetadataApi
*
*/
public static final class TrustedMetadataApiStub
extends io.grpc.stub.AbstractAsyncStub {
private TrustedMetadataApiStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected TrustedMetadataApiStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new TrustedMetadataApiStub(channel, callOptions);
}
/**
*
**
* Create a new object in the TRAC metadata store.
* This call behaves identically to the equivalent public API call, without the
* restriction on which types of object can be saved.
* @see TracMetadataApi.createObject()
*
**
* Update an existing object in the TRAC metadata store.
* This call behaves identically to the equivalent public API call, however it
* can be used with any type of object that supports versioning (currently DATA
* and CUSTOM).
* @see TracMetadataApi.updateObject()
*
**
* Update the tag for an existing object in the TRAC metadata store.
* This call behaves identically to the equivalent public API call.
* @see TracMetadataApi.updateTag()
*
**
* Preallocate an object ID for an object that will be created later.
* This call is for use by TRAC components that need to reserve an ID before
* it is used, particularly if the object ID must be included in the definition
* of an object that has not been created yet. When creating an ID the tenant
* and object type must be specified, the object that is eventually saved must
* match these two conditions. Orphan IDs are expected - if a component request
* an ID and encounters an error before that ID is used, the orphan ID is just
* ignored.
*
**
* Create an object using an ID that was previously preallocated.
* This call behaves essentially the same as createObject(), with all the
* same validation. The only difference is that the new definition must be
* supplied with an object header, including the object ID returned from a
* prior call to preallocateId().
* Error conditions include all the error conditions for createObject().
* Using a preallocated ID twice, attempting to save to an unknown ID or the
* ID of another object that already exists are also errors.
*
**
* Perform a batch of write operations on the TRAC metadata store.
* This call behaves similarly to the equivalent public API call. However,
* the createObject, updateObject and updateTag request types take their
* semantics from the trusted API instead of the public one. It is also
* possible to include preallocateId and createPreallocatedObject in the
* batch request.
* @see TracMetadataApi.writeBatch()
*
**
* Read a single object from the TRAC metadata store using a tag selector.
* This call behaves identically to the equivalent public API call.
* @see TracMetadataApi.readObject()
*
**
* Read multiple objects from the TRAC metadata store using tag selectors.
* This call behaves identically to the equivalent public API call.
* @see TracMetadataApi.readBatch()
*
**
* Perform a search against the TRAC metadata store.
* This call behaves identically to the equivalent public API call.
* @see TracMetadataApi.search()
*
*/
public void search(org.finos.tracdap.api.MetadataSearchRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getSearchMethod(), getCallOptions()), request, responseObserver);
}
}
/**
* A stub to allow clients to do synchronous rpc calls to service TrustedMetadataApi.
*
**
* Trusted API reading, writing and searching for objects in the TRAC metadata store.
* This API is only available to other components of the TRAC platform, it is
* not exposed to clients via the platform gateway.
* Most of the calls in this interface are identical to their public equivalents.
* Extra calls are available for pre-allocating objects, a facility which is not
* available to clients of the platform. Restrictions on the creation of certain
* object types and manipulation of controlled tag attributes are lifted. Methods
* for performing HTTP GET requests of RESTFUL resources are not duplicated.
* @see TracMetadataApi
*
*/
public static final class TrustedMetadataApiBlockingStub
extends io.grpc.stub.AbstractBlockingStub {
private TrustedMetadataApiBlockingStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected TrustedMetadataApiBlockingStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new TrustedMetadataApiBlockingStub(channel, callOptions);
}
/**
*
**
* Create a new object in the TRAC metadata store.
* This call behaves identically to the equivalent public API call, without the
* restriction on which types of object can be saved.
* @see TracMetadataApi.createObject()
*
**
* Update an existing object in the TRAC metadata store.
* This call behaves identically to the equivalent public API call, however it
* can be used with any type of object that supports versioning (currently DATA
* and CUSTOM).
* @see TracMetadataApi.updateObject()
*
**
* Update the tag for an existing object in the TRAC metadata store.
* This call behaves identically to the equivalent public API call.
* @see TracMetadataApi.updateTag()
*
**
* Preallocate an object ID for an object that will be created later.
* This call is for use by TRAC components that need to reserve an ID before
* it is used, particularly if the object ID must be included in the definition
* of an object that has not been created yet. When creating an ID the tenant
* and object type must be specified, the object that is eventually saved must
* match these two conditions. Orphan IDs are expected - if a component request
* an ID and encounters an error before that ID is used, the orphan ID is just
* ignored.
*
**
* Create an object using an ID that was previously preallocated.
* This call behaves essentially the same as createObject(), with all the
* same validation. The only difference is that the new definition must be
* supplied with an object header, including the object ID returned from a
* prior call to preallocateId().
* Error conditions include all the error conditions for createObject().
* Using a preallocated ID twice, attempting to save to an unknown ID or the
* ID of another object that already exists are also errors.
*
**
* Perform a batch of write operations on the TRAC metadata store.
* This call behaves similarly to the equivalent public API call. However,
* the createObject, updateObject and updateTag request types take their
* semantics from the trusted API instead of the public one. It is also
* possible to include preallocateId and createPreallocatedObject in the
* batch request.
* @see TracMetadataApi.writeBatch()
*
**
* Read a single object from the TRAC metadata store using a tag selector.
* This call behaves identically to the equivalent public API call.
* @see TracMetadataApi.readObject()
*
**
* Read multiple objects from the TRAC metadata store using tag selectors.
* This call behaves identically to the equivalent public API call.
* @see TracMetadataApi.readBatch()
*
**
* Perform a search against the TRAC metadata store.
* This call behaves identically to the equivalent public API call.
* @see TracMetadataApi.search()
*
*/
public org.finos.tracdap.api.MetadataSearchResponse search(org.finos.tracdap.api.MetadataSearchRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getSearchMethod(), getCallOptions(), request);
}
}
/**
* A stub to allow clients to do ListenableFuture-style rpc calls to service TrustedMetadataApi.
*
**
* Trusted API reading, writing and searching for objects in the TRAC metadata store.
* This API is only available to other components of the TRAC platform, it is
* not exposed to clients via the platform gateway.
* Most of the calls in this interface are identical to their public equivalents.
* Extra calls are available for pre-allocating objects, a facility which is not
* available to clients of the platform. Restrictions on the creation of certain
* object types and manipulation of controlled tag attributes are lifted. Methods
* for performing HTTP GET requests of RESTFUL resources are not duplicated.
* @see TracMetadataApi
*
*/
public static final class TrustedMetadataApiFutureStub
extends io.grpc.stub.AbstractFutureStub {
private TrustedMetadataApiFutureStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected TrustedMetadataApiFutureStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new TrustedMetadataApiFutureStub(channel, callOptions);
}
/**
*
**
* Create a new object in the TRAC metadata store.
* This call behaves identically to the equivalent public API call, without the
* restriction on which types of object can be saved.
* @see TracMetadataApi.createObject()
*
**
* Update an existing object in the TRAC metadata store.
* This call behaves identically to the equivalent public API call, however it
* can be used with any type of object that supports versioning (currently DATA
* and CUSTOM).
* @see TracMetadataApi.updateObject()
*
**
* Update the tag for an existing object in the TRAC metadata store.
* This call behaves identically to the equivalent public API call.
* @see TracMetadataApi.updateTag()
*
**
* Preallocate an object ID for an object that will be created later.
* This call is for use by TRAC components that need to reserve an ID before
* it is used, particularly if the object ID must be included in the definition
* of an object that has not been created yet. When creating an ID the tenant
* and object type must be specified, the object that is eventually saved must
* match these two conditions. Orphan IDs are expected - if a component request
* an ID and encounters an error before that ID is used, the orphan ID is just
* ignored.
*
**
* Create an object using an ID that was previously preallocated.
* This call behaves essentially the same as createObject(), with all the
* same validation. The only difference is that the new definition must be
* supplied with an object header, including the object ID returned from a
* prior call to preallocateId().
* Error conditions include all the error conditions for createObject().
* Using a preallocated ID twice, attempting to save to an unknown ID or the
* ID of another object that already exists are also errors.
*
**
* Perform a batch of write operations on the TRAC metadata store.
* This call behaves similarly to the equivalent public API call. However,
* the createObject, updateObject and updateTag request types take their
* semantics from the trusted API instead of the public one. It is also
* possible to include preallocateId and createPreallocatedObject in the
* batch request.
* @see TracMetadataApi.writeBatch()
*
**
* Read a single object from the TRAC metadata store using a tag selector.
* This call behaves identically to the equivalent public API call.
* @see TracMetadataApi.readObject()
*
**
* Read multiple objects from the TRAC metadata store using tag selectors.
* This call behaves identically to the equivalent public API call.
* @see TracMetadataApi.readBatch()
*
**
* Perform a search against the TRAC metadata store.
* This call behaves identically to the equivalent public API call.
* @see TracMetadataApi.search()
*
*/
public com.google.common.util.concurrent.ListenableFuture search(
org.finos.tracdap.api.MetadataSearchRequest request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getSearchMethod(), getCallOptions()), request);
}
}
private static final int METHODID_CREATE_OBJECT = 0;
private static final int METHODID_UPDATE_OBJECT = 1;
private static final int METHODID_UPDATE_TAG = 2;
private static final int METHODID_PREALLOCATE_ID = 3;
private static final int METHODID_CREATE_PREALLOCATED_OBJECT = 4;
private static final int METHODID_WRITE_BATCH = 5;
private static final int METHODID_READ_OBJECT = 6;
private static final int METHODID_READ_BATCH = 7;
private static final int METHODID_SEARCH = 8;
private static final class MethodHandlers implements
io.grpc.stub.ServerCalls.UnaryMethod,
io.grpc.stub.ServerCalls.ServerStreamingMethod,
io.grpc.stub.ServerCalls.ClientStreamingMethod,
io.grpc.stub.ServerCalls.BidiStreamingMethod {
private final AsyncService serviceImpl;
private final int methodId;
MethodHandlers(AsyncService serviceImpl, int methodId) {
this.serviceImpl = serviceImpl;
this.methodId = methodId;
}
@java.lang.Override
@java.lang.SuppressWarnings("unchecked")
public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) {
switch (methodId) {
case METHODID_CREATE_OBJECT:
serviceImpl.createObject((org.finos.tracdap.api.MetadataWriteRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_UPDATE_OBJECT:
serviceImpl.updateObject((org.finos.tracdap.api.MetadataWriteRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_UPDATE_TAG:
serviceImpl.updateTag((org.finos.tracdap.api.MetadataWriteRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_PREALLOCATE_ID:
serviceImpl.preallocateId((org.finos.tracdap.api.MetadataWriteRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_CREATE_PREALLOCATED_OBJECT:
serviceImpl.createPreallocatedObject((org.finos.tracdap.api.MetadataWriteRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_WRITE_BATCH:
serviceImpl.writeBatch((org.finos.tracdap.api.MetadataWriteBatchRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_READ_OBJECT:
serviceImpl.readObject((org.finos.tracdap.api.MetadataReadRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_READ_BATCH:
serviceImpl.readBatch((org.finos.tracdap.api.MetadataBatchRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_SEARCH:
serviceImpl.search((org.finos.tracdap.api.MetadataSearchRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
default:
throw new AssertionError();
}
}
@java.lang.Override
@java.lang.SuppressWarnings("unchecked")
public io.grpc.stub.StreamObserver invoke(
io.grpc.stub.StreamObserver responseObserver) {
switch (methodId) {
default:
throw new AssertionError();
}
}
}
public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) {
return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
.addMethod(
getCreateObjectMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
org.finos.tracdap.api.MetadataWriteRequest,
org.finos.tracdap.metadata.TagHeader>(
service, METHODID_CREATE_OBJECT)))
.addMethod(
getUpdateObjectMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
org.finos.tracdap.api.MetadataWriteRequest,
org.finos.tracdap.metadata.TagHeader>(
service, METHODID_UPDATE_OBJECT)))
.addMethod(
getUpdateTagMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
org.finos.tracdap.api.MetadataWriteRequest,
org.finos.tracdap.metadata.TagHeader>(
service, METHODID_UPDATE_TAG)))
.addMethod(
getPreallocateIdMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
org.finos.tracdap.api.MetadataWriteRequest,
org.finos.tracdap.metadata.TagHeader>(
service, METHODID_PREALLOCATE_ID)))
.addMethod(
getCreatePreallocatedObjectMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
org.finos.tracdap.api.MetadataWriteRequest,
org.finos.tracdap.metadata.TagHeader>(
service, METHODID_CREATE_PREALLOCATED_OBJECT)))
.addMethod(
getWriteBatchMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
org.finos.tracdap.api.MetadataWriteBatchRequest,
org.finos.tracdap.api.MetadataWriteBatchResponse>(
service, METHODID_WRITE_BATCH)))
.addMethod(
getReadObjectMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
org.finos.tracdap.api.MetadataReadRequest,
org.finos.tracdap.metadata.Tag>(
service, METHODID_READ_OBJECT)))
.addMethod(
getReadBatchMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
org.finos.tracdap.api.MetadataBatchRequest,
org.finos.tracdap.api.MetadataBatchResponse>(
service, METHODID_READ_BATCH)))
.addMethod(
getSearchMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
org.finos.tracdap.api.MetadataSearchRequest,
org.finos.tracdap.api.MetadataSearchResponse>(
service, METHODID_SEARCH)))
.build();
}
private static abstract class TrustedMetadataApiBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier {
TrustedMetadataApiBaseDescriptorSupplier() {}
@java.lang.Override
public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
return org.finos.tracdap.api.MetadataTrusted.getDescriptor();
}
@java.lang.Override
public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() {
return getFileDescriptor().findServiceByName("TrustedMetadataApi");
}
}
private static final class TrustedMetadataApiFileDescriptorSupplier
extends TrustedMetadataApiBaseDescriptorSupplier {
TrustedMetadataApiFileDescriptorSupplier() {}
}
private static final class TrustedMetadataApiMethodDescriptorSupplier
extends TrustedMetadataApiBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoMethodDescriptorSupplier {
private final java.lang.String methodName;
TrustedMetadataApiMethodDescriptorSupplier(java.lang.String methodName) {
this.methodName = methodName;
}
@java.lang.Override
public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() {
return getServiceDescriptor().findMethodByName(methodName);
}
}
private static volatile io.grpc.ServiceDescriptor serviceDescriptor;
public static io.grpc.ServiceDescriptor getServiceDescriptor() {
io.grpc.ServiceDescriptor result = serviceDescriptor;
if (result == null) {
synchronized (TrustedMetadataApiGrpc.class) {
result = serviceDescriptor;
if (result == null) {
serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
.setSchemaDescriptor(new TrustedMetadataApiFileDescriptorSupplier())
.addMethod(getCreateObjectMethod())
.addMethod(getUpdateObjectMethod())
.addMethod(getUpdateTagMethod())
.addMethod(getPreallocateIdMethod())
.addMethod(getCreatePreallocatedObjectMethod())
.addMethod(getWriteBatchMethod())
.addMethod(getReadObjectMethod())
.addMethod(getReadBatchMethod())
.addMethod(getSearchMethod())
.build();
}
}
}
return result;
}
}