Examples of IFilter


Examples of jifx.connection.configurator.filters.IFilter

    if (configuration != null) {
      try {
        FilterFactory ff = new FilterFactory();

        // Creo todos los filtros
        IFilter filter = null;
        IFilter prevFilter = null;
        Node node = null;
        Element element = null;

        String[] names = this.getServiceName().getCanonicalName().split("=");
        channelName = names[names.length-1];
        if (channelName == null) {
          logger.error("| Nos se pudo obtener el nombre del canal!!!! "+names+"|");
          return;
        }
        if (jndi == null || jndi.trim().equals(""))
          jndi = "localhost:1099";
       
        logger.info(channelName+"| Iniciando connection...|");
        logger.info(channelName+"| Servicio jndi: "+jndi+"|");

        AttributeChangeNotificationFilter nf = new AttributeChangeNotificationFilter();
        nf.enableAttribute("ChannelState");

        incomingTopic = configuration.getAttribute("incomingTopic");
        outgoingTopic = configuration.getAttribute("outgoingTopic");
        idxLink = 0;

        NodeList nodes = configuration.getChildNodes();
        for (int i = 0; i < nodes.getLength(); i++) {
          node = nodes.item(i);
          if (node.getNodeType() == Node.ELEMENT_NODE) {
            element = (Element) node;
            filter = ff.createFilter(channelName, jndi, timeout, flushTime, incomingTopic, outgoingTopic, element);
            if (filter == null)
              return;
            this.addNotificationListener((NotificationListener) filter, nf, this);
            if (prevFilter != null)
              prevFilter.setFilterTM(filter);
            filter.setFilterTC(prevFilter);
            prevFilter = filter;
          }
        }
        channelState = ChannelState.ACTIVE;
View Full Code Here

Examples of logisticspipes.interfaces.routing.IFilter

    return null;
  }
 
  public IFilter getFilter() {
    if(filter == null) {
      filter = new IFilter() {
        @Override
        public boolean isBlocked() {
          return isBlocking;
        }
 
View Full Code Here

Examples of org.apache.cassandra.db.filter.IFilter

        assertTrue(cfi.isIndexBuilt());

        // verify we get it back w/ index query too
        IndexExpression expr = new IndexExpression(COLUMN, IndexOperator.EQ, VALUE);
        IndexClause clause = new IndexClause(Arrays.asList(expr), ByteBufferUtil.EMPTY_BYTE_BUFFER, Integer.MAX_VALUE);
        IFilter filter = new IdentityQueryFilter();
        IPartitioner p = StorageService.getPartitioner();
        Range range = new Range(p.getMinimumToken(), p.getMinimumToken());
        rows = table.getColumnFamilyStore(CF1).scan(clause, range, filter);
        assertEquals(LOOPS, rows.size());
View Full Code Here

Examples of org.apache.cassandra.db.filter.IFilter

        cfs.addSSTable(sstr);
        cfs.buildSecondaryIndexes(cfs.getSSTables(), cfs.getIndexedColumns());
       
        IndexExpression expr = new IndexExpression(ByteBufferUtil.bytes("birthdate"), IndexOperator.EQ, ByteBufferUtil.bytes(1L));
        IndexClause clause = new IndexClause(Arrays.asList(expr), ByteBufferUtil.EMPTY_BYTE_BUFFER, 100);
        IFilter filter = new IdentityQueryFilter();
        IPartitioner p = StorageService.getPartitioner();
        Range range = new Range(p.getMinimumToken(), p.getMinimumToken());
        List<Row> rows = cfs.scan(clause, range, filter);
       
        assertEquals("IndexExpression should return two rows on recoverAndOpen", 2, rows.size());
View Full Code Here

Examples of org.apache.cassandra.db.filter.IFilter

            IPartitioner p = StorageService.getPartitioner();
            IndexExpression expr = new IndexExpression(ByteBufferUtil.bytes("birthdate"),
                                                       IndexOperator.EQ,
                                                       ByteBufferUtil.bytes(val));
            List<IndexExpression> clause = Arrays.asList(expr);
            IFilter filter = new IdentityQueryFilter();
            Range<RowPosition> range = Util.range("", "");
            List<Row> rows = cfs.search(clause, range, 100, filter);
            assertEquals(1, rows.size());
            assert rows.get(0).key.key.equals(ByteBufferUtil.bytes(key));
        }
View Full Code Here

Examples of org.apache.cassandra.db.filter.IFilter

            Thread.sleep(10);

        // verify we get it back w/ index query too
        IndexExpression expr = new IndexExpression(COLUMN, IndexOperator.EQ, VALUE);
        List<IndexExpression> clause = Arrays.asList(expr);
        IFilter filter = new IdentityQueryFilter();
        IPartitioner p = StorageService.getPartitioner();
        Range<RowPosition> range = Util.range("", "");
        rows = table.getColumnFamilyStore(CF1).search(clause, range, Integer.MAX_VALUE, filter);
        assertEquals(LOOPS, rows.size());
View Full Code Here

Examples of org.apache.cassandra.db.filter.IFilter

                // get the raw columns requested, and additional columns for the expressions if necessary
                Row rawRow = rowIterator.next();
                ColumnFamily data = rawRow.cf;

                // roughtly
                IFilter extraFilter = filter.getExtraFilter(data);
                if (extraFilter != null)
                {
                    QueryPath path = new QueryPath(columnFamily);
                    ColumnFamily cf = filter.cfs.getColumnFamily(new QueryFilter(rawRow.key, path, extraFilter));
                    if (cf != null)
View Full Code Here

Examples of org.apache.cassandra.db.filter.IFilter

        ColumnFamilyStore hintStore = Table.open(Table.SYSTEM_TABLE).getColumnFamilyStore(HINTS_CF);
        IPartitioner p = StorageService.getPartitioner();
        RowPosition minPos = p.getMinimumToken().minKeyBound();
        Range<RowPosition> range = new Range<RowPosition>(minPos, minPos, p);
        IFilter filter = new NamesQueryFilter(ImmutableSortedSet.<ByteBuffer>of());
        List<Row> rows = hintStore.getRangeSlice(null, range, Integer.MAX_VALUE, filter, null);
        for (Row row : rows)
        {
            Token<?> token = StorageService.getPartitioner().getTokenFactory().fromByteArray(row.key.key);
            InetAddress target = StorageService.instance.getTokenMetadata().getEndpoint(token);
View Full Code Here

Examples of org.apache.cassandra.db.filter.IFilter

        ColumnFamilyStore hintStore = Table.open(Table.SYSTEM_TABLE).getColumnFamilyStore(HINTS_CF);
        IPartitioner p = StorageService.getPartitioner();
        RowPosition minPos = p.getMinimumToken().minKeyBound();
        Range<RowPosition> range = new Range<RowPosition>(minPos, minPos, p);
        IFilter filter = new NamesQueryFilter(ImmutableSortedSet.<ByteBuffer>of());
        List<Row> rows = hintStore.getRangeSlice(null, range, Integer.MAX_VALUE, filter, null);
        for (Row row : rows)
        {
            Token<?> token = StorageService.getPartitioner().getTokenFactory().fromByteArray(row.key.key);
            InetAddress target = StorageService.instance.getTokenMetadata().getEndpoint(token);
View Full Code Here

Examples of org.apache.cassandra.db.filter.IFilter

                // get the raw columns requested, and additional columns for the expressions if necessary
                Row rawRow = rowIterator.next();
                ColumnFamily data = rawRow.cf;

                // roughtly
                IFilter extraFilter = filter.getExtraFilter(data);
                if (extraFilter != null)
                {
                    QueryPath path = new QueryPath(columnFamily);
                    ColumnFamily cf = filter.cfs.getColumnFamily(new QueryFilter(rawRow.key, path, extraFilter));
                    if (cf != null)
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.