All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.hazelcast.core.EntryView Maven / Gradle / Ivy

There is a newer version: 5.0-BETA-1
Show newest version
/*
 * Copyright (c) 2008-2017, Hazelcast, Inc. All Rights Reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.hazelcast.core;

/**
 * EntryView represents a readonly view of a map entry.
 *
 * @param  key
 * @param  value
 */
public interface EntryView {

    /**
     * Returns the key of the entry.
     *
     * @return the key of the entry
     */
    K getKey();

    /**
     * Returns the value of the entry.
     *
     * @return the value of the entry
     */
    V getValue();

    /**
     * Returns the cost (in bytes) of the entry.
     * 

*

Warning:

*

* This method returns -1 if statistics is not enabled. *

* * @return the cost in bytes of the entry */ long getCost(); /** * Returns the creation time of the entry. *

*

Warning:

*

* This method returns -1 if statistics is not enabled. *

* * @return the creation time of the entry */ long getCreationTime(); /** * Returns the expiration time of the entry. * * @return the expiration time of the entry */ long getExpirationTime(); /** * Returns number of hits of the entry. *

*

Warning:

*

ˆ * This method returns -1 if statistics is not enabled. *

* * @return number of hits of the entry */ long getHits(); /** * Returns the last access time for the entry. *

*

Warning:

*

ˆ * This method returns -1 if statistics is not enabled. *

* * @return the last access time for the entry */ long getLastAccessTime(); /** * Returns the last time the value was flushed to mapstore. *

*

Warning:

*

ˆ * This method returns -1 if statistics is not enabled. *

* * @return the last store time for the value */ long getLastStoredTime(); /** * Returns the last time the value was updated. *

*

Warning:

*

ˆ * This method returns -1 if statistics is not enabled. *

* * @return the last time the value was updated */ long getLastUpdateTime(); /** * Returns the version of the entry * * @return the version of the entry */ long getVersion(); /** * Returns the last set time to live second. * * @return the last set time to live second. */ long getTtl(); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy