Abstract base class for a DDF implementor, which provides the support methods necessary to implement various DDF interfaces, such as IHandleRepresentations and ISupportML. We use the Dependency Injection, Delegation, and Composite patterns to make it easy for oth
| 78 | * possible, in an engine-dependent manner. |
| 79 | */ |
| 80 | public abstract class DDFManager extends ALoggable implements IDDFManager, IHandleSqlLike, ISupportPhantomReference { |
| 81 | |
| 82 | public enum EngineType { |
| 83 | SPARK, |
| 84 | JDBC, |
| 85 | SFDC, |
| 86 | POSTGRES, |
| 87 | AWS, |
| 88 | REDSHIFT, |
| 89 | BASIC, |
| 90 | S3, |
| 91 | HDFS |
| 92 | ; |
| 93 | |
| 94 | public static EngineType fromString(String str) throws DDFException { |
| 95 | try { |
| 96 | return EngineType.valueOf(str.toUpperCase()); |
| 97 | } catch (RuntimeException e) { |
| 98 | throw new DDFException("Unknown engine type: " + str, e); |
| 99 | } |
| 100 | } |
| 101 | } |
| 102 | |
| 103 | |
| 104 | // The engine name, should be unique. |
| 105 | private UUID uuid = UUID.randomUUID(); |
| 106 | private EngineType engineType; |
| 107 | // DataSourceDescriptor. |
| 108 | private DataSourceDescriptor mDataSourceDescriptor; |
| 109 | // DDFCoordinator. |
| 110 | private DDFCoordinator mDDFCoordinator; |
| 111 | |
| 112 | |
| 113 | public UUID getUUID() { |
| 114 | return uuid; |
| 115 | } |
| 116 | |
| 117 | public void setUUID(UUID uuid) { |
| 118 | this.uuid = uuid; |
| 119 | } |
| 120 | |
| 121 | public EngineType getEngineType() { |
| 122 | return engineType; |
| 123 | } |
| 124 | |
| 125 | public void setEngineType(EngineType engineType) { |
| 126 | this.engineType = engineType; |
| 127 | } |
| 128 | |
| 129 | public DDFCoordinator getDDFCoordinator() { |
| 130 | return mDDFCoordinator; |
| 131 | } |
| 132 | |
| 133 | public void setDDFCoordinator(DDFCoordinator ddfCoordinator) { |
| 134 | this.mDDFCoordinator = ddfCoordinator; |
| 135 | } |
| 136 | |
| 137 | public DataSourceDescriptor getDataSourceDescriptor() { |
nothing calls this directly
no outgoing calls
no test coverage detected