Examples of Slice


Examples of org.apache.openjpa.slice.Slice

    public void fromProperties(Map original) {
        super.fromProperties(original);
        setDiagnosticContext(this);
        List<String> sliceNames = findSlices(original);
        for (String name : sliceNames) {
            Slice slice = newSlice(name, original);
            _slices.add(slice);
        }
    }
View Full Code Here

Examples of org.apache.openjpa.slice.Slice

    public DistributedJDBCStoreManager(DistributedJDBCConfiguration conf) {
        super();
        _conf = conf;
        _slices = new ArrayList<SliceStoreManager>();
        List<Slice> slices = conf.getSlices(Slice.Status.ACTIVE);
        Slice masterSlice = conf.getMasterSlice();
        for (Slice slice : slices) {
            SliceStoreManager store = new SliceStoreManager(slice);
            _slices.add(store);
            if (slice == masterSlice) {
                _master = store;
View Full Code Here

Examples of org.apache.openjpa.slice.Slice

        child.setId(getId()+DOT+key);
        setDiagnosticContext(child);
        child.setMappingDefaults(this.getMappingDefaultsInstance());
        child.setDataCacheManager(this.getDataCacheManagerInstance());
        child.setMetaDataRepository(this.getMetaDataRepositoryInstance());
        Slice slice = new Slice(key, child);
        Log log = getConfigurationLog();
        if (log.isTraceEnabled())
            log.trace(_loc.get("slice-configuration", key, child
                    .toProperties(false)));
        return slice;
View Full Code Here

Examples of org.apache.openjpa.slice.Slice

        for (Object key : newProps.keySet()) {
            if (!String.class.isInstance(key)
             && key.toString().startsWith(prefix))
                throw new UserException(_loc.get("slice-add-wrong-key", key));
        }
        Slice slice = getSlice(name);
        if (slice != null)
            throw new UserException(_loc.get("slice-exists", name));
        Map<String,String> original = super.toProperties(true);
        original.putAll(newProps);
         slice = newSlice(name, original);
View Full Code Here

Examples of org.apache.openjpa.slice.Slice

    public void fromProperties(Map original) {
        super.fromProperties(original);
        setDiagnosticContext(this);
        List<String> sliceNames = findSlices(original);
        for (String name : sliceNames) {
            Slice slice = newSlice(name, original);
            _slices.add(slice);
        }
    }
View Full Code Here

Examples of org.apache.openjpa.slice.Slice

        child.setId(getId()+DOT+key);
        setDiagnosticContext(child);
        child.setMappingDefaults(this.getMappingDefaultsInstance());
        child.setDataCacheManager(this.getDataCacheManagerInstance());
        child.setMetaDataRepository(this.getMetaDataRepositoryInstance());
        Slice slice = new Slice(key, child);
        Log log = getConfigurationLog();
        if (log.isTraceEnabled())
            log.trace(_loc.get("slice-configuration", key, child
                    .toProperties(false)));
        return slice;
View Full Code Here

Examples of org.apache.openjpa.slice.Slice

        for (Object key : newProps.keySet()) {
            if (!String.class.isInstance(key)
             && key.toString().startsWith(prefix))
                throw new UserException(_loc.get("slice-add-wrong-key", key));
        }
        Slice slice = getSlice(name);
        if (slice != null)
            throw new UserException(_loc.get("slice-exists", name));
        Map<String,String> original = super.toProperties(true);
        original.putAll(newProps);
         slice = newSlice(name, original);
View Full Code Here

Examples of org.apache.openjpa.slice.Slice

    public void fromProperties(Map original) {
        super.fromProperties(original);
        setDiagnosticContext(this);
        List<String> sliceNames = findSlices(original);
        for (String name : sliceNames) {
            Slice slice = newSlice(name, original);
            _slices.add(slice);
        }
    }
View Full Code Here

Examples of org.apache.solr.common.cloud.Slice

    DocRouter docRouter = docCollection.getRouter();
    SolrInputDocument doc = value.getSolrInputDocument();
    String keyStr = key.toString();
   
    // TODO: scalability: replace linear search in HashBasedRouter.hashToSlice() with binary search on sorted hash ranges
    Slice slice = docRouter.getTargetSlice(keyStr, doc, emptySolrParams, docCollection);
   
//    LOG.info("slice: {}", slice);
    if (slice == null) {
      throw new IllegalStateException("No matching slice found! The slice seems unavailable. docRouterClass: "
          + docRouter.getClass().getName());
    }
    int rootShard = shardNumbers.get(slice.getName());
    if (rootShard < 0 || rootShard >= shards) {
      throw new IllegalStateException("Illegal shard number " + rootShard + " for slice: " + slice + ", docCollection: "
          + docCollection);
    }     
View Full Code Here

Examples of org.codehaus.preon.annotation.Slice

*/
public class SlicingCodecDecorator implements CodecDecorator {

    public <T> Codec<T> decorate(Codec<T> decorated, AnnotatedElement metadata,
                                 Class<T> type, ResolverContext context) {
        Slice slice = getAnnotation(metadata, type, Slice.class);
        if (slice != null) {
            return createCodecFromSlice(decorated, slice, context);
        }
        return decorated;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.