Package com.asakusafw.thundergate.runtime.cache

Examples of com.asakusafw.thundergate.runtime.cache.ThunderGateCacheSupport


                        null,
                        startTimestamp,
                        tableName,
                        tableInfo.getDfsFilePath());

                ThunderGateCacheSupport model = createDataModelObject(tableName, tableInfo);
                Calendar nextTimestamp = repository.putCacheInfo(nextLocalInfo);
                CacheInfo nextRemoteInfo = new CacheInfo(
                        CacheInfo.FEATURE_VERSION,
                        cacheId,
                        nextTimestamp,
                        tableName,
                        tableInfo.getImportTargetColumns(),
                        model.getClass().getName(),
                        model.__tgc__DataModelVersion());

                FileProtocol.Kind kind = startTimestamp == null
                    ? FileProtocol.Kind.CREATE_CACHE
                    : FileProtocol.Kind.UPDATE_CACHE;
                FileProtocol protocol = new FileProtocol(kind, tableInfo.getDfsFilePath(), nextRemoteInfo);
View Full Code Here


                    "Inconsistent column set: expected {0}, but was {1}",
                    new TreeSet<String>(tableInfo.getImportTargetColumns()), remoteInfo.getColumnNames()));
            return null;
        }

        ThunderGateCacheSupport model = createDataModelObject(tableName, tableInfo);
        if (remoteInfo.getModelClassName().equals(model.getClass().getName()) == false) {
            LOG.warn("TG-IMPORTER-11010", tableName, cacheId, MessageFormat.format(
                    "Inconsistent model class: expected {0}, but was {1}",
                    model.getClass().getName(), remoteInfo.getModelClassName()));
            return null;
        }
        if (remoteInfo.getModelClassVersion() != model.__tgc__DataModelVersion()) {
            LOG.warn("TG-IMPORTER-11010", tableName, cacheId, MessageFormat.format(
                    "Inconsistent model version: expected {0}, but was {1}",
                    model.__tgc__DataModelVersion(), remoteInfo.getModelClassVersion()));
            return null;
        }

        LocalCacheInfo local = repository.getCacheInfo(remoteInfo.getId());
        if (local == null) {
View Full Code Here

        if (tableClass == null) {
            return null;
        }
        if (ThunderGateCacheSupport.class.isAssignableFrom(tableClass)) {
            try {
                ThunderGateCacheSupport instance = tableClass
                    .asSubclass(ThunderGateCacheSupport.class)
                    .newInstance();
                return instance.__tgc__TimestampColumn();
            } catch (Exception e) {
                e.printStackTrace();
            }
        }
        return null;
View Full Code Here

TOP

Related Classes of com.asakusafw.thundergate.runtime.cache.ThunderGateCacheSupport

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.