Examples of touch()


Examples of org.apache.camel.component.jmx.beans.ISimpleMXBean.touch()

public class JMXObjectPropertiesTest extends SimpleBeanFixture {

    @Test
    public void testObjectProperties() throws Exception {
        ISimpleMXBean bean = getSimpleMXBean();
        bean.touch();
        waitForMessages();
    }

    @Override
    protected JMXUriBuilder buildFromURI() {
View Full Code Here

Examples of org.apache.camel.component.jmx.beans.ISimpleMXBean.touch()

        // we should only get 5 messages, which is 1/2 the number of times we touched the object.
        // The 1/2 is due to the behavior of the test NotificationFilter implemented below
        getMockEndpoint().setExpectedMessageCount(5);
        for (int i = 0; i < 10; i++) {
            bean.touch();
        }

        waitForMessages();
        assertEquals("5 notifications should have been filtered", 5, mRejected.size());
View Full Code Here

Examples of org.apache.cassandra.db.Table.touch()

    }

    static void touch_local(String tablename, String key, boolean fData ) throws IOException
    {
    Table table = Table.open( tablename );
    table.touch(key, fData);
    }

    static void weakTouchProtocol(String tablename, String key, boolean fData) throws Exception
    {
      EndPoint endPoint = null;
View Full Code Here

Examples of org.apache.cassandra.io.SSTable.touch()

                */
                boolean bVal = SSTable.isKeyInFile(key, file);
                if ( !bVal )
                    continue;
                SSTable ssTable = new SSTable(file);
                ssTable.touch(key, fData);
            }
        }
        finally
        {
            lock_.readLock().unlock();
View Full Code Here

Examples of org.apache.fulcrum.cache.RefreshableCachedObject.touch()

        }
        if (obj instanceof RefreshableCachedObject)
        {
            // notify it that it's being accessed.
            RefreshableCachedObject rco = (RefreshableCachedObject) obj;
            rco.touch();
        }
        return obj;
    }

    /**
 
View Full Code Here

Examples of org.apache.jackrabbit.vault.packaging.JcrPackageDefinition.touch()

        Node defNode = content.addNode(NN_VLT_DEFINITION);
        JcrPackageDefinition def = new JcrPackageDefinitionImpl(defNode);
        def.set(JcrPackageDefinition.PN_NAME, pid.getName(), false);
        def.set(JcrPackageDefinition.PN_GROUP, pid.getGroup(), false);
        def.set(JcrPackageDefinition.PN_VERSION, pid.getVersionString(), false);
        def.touch(null, false);
        content.setProperty(JcrConstants.JCR_LASTMODIFIED, Calendar.getInstance());
        content.setProperty(JcrConstants.JCR_MIMETYPE, MIME_TYPE);
        InputStream in = new ByteArrayInputStream(new byte[0]);
        try {
            if (pack != null && pack.getFile() != null) {
View Full Code Here

Examples of org.apache.myfaces.extensions.cdi.jsf.impl.scope.conversation.spi.EditableWindowContext.touch()

            result = createWindowContext(windowContextId);

            this.windowContextMap.put(windowContextId, result);
        }

        result.touch();

        return result;
    }

    private EditableWindowContext createWindowContext(String windowContextId)
View Full Code Here

Examples of org.apache.shiro.session.Session.touch()

        @SuppressWarnings("unchecked")
        final MultivaluedMap<String, String> requestHeaders = (MultivaluedMap<String, String>) ThreadContext.get(
                "REQUEST_HEADERS");
        // extend session unless the relevant header was passed.
        if (requestHeaders == null || !"true".equalsIgnoreCase(requestHeaders.getFirst("X-Graylog2-No-Session-Extension"))) {
            session.touch();
        } else {
            LOG.debug("Not extending session because the request indicated not to.");
        }
        ThreadContext.bind(subject);
View Full Code Here

Examples of org.apache.shiro.session.Session.touch()

        System.out.println(session.getHost());//获取当前登录用户主机地址
        System.out.println(session.getTimeout());//获取超时时间
        System.out.println(session.getStartTimestamp()); //获取会话创建时间
        System.out.println(session.getLastAccessTime()); //获取最后访问时间
        Thread.sleep(1000L);
        session.touch();//更新会话最后访问时间
        System.out.println(session.getLastAccessTime());


        //会话属性操作
        session.setAttribute("key", "123");
View Full Code Here

Examples of org.apache.shiro.session.Session.touch()

            //Subject should never _ever_ be null, but just in case:
            if (subject != null) {
                Session session = subject.getSession(false);
                if (session != null) {
                    try {
                        session.touch();
                    } catch (Throwable t) {
                        log.error("session.touch() method invocation has failed.  Unable to update" +
                                "the corresponding session's last access time based on the incoming request.", t);
                    }
                }
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.