Hitachi

In-Memory Data Grid Hitachi Elastic Application Data Store


18.2.7 CacheInfo interface

Organization of this subsection

(1) Description

This interface acquires information about caches.

(2) Interface name

com.hitachi.software.xeads.common.CacheInfo

(3) List of methods

The following table lists and describes the methods provided by the CacheInfo interface:

Method name

Description

getType()

Acquires the cache types.

getCacheDataFileSize()

Acquires the size (in bytes) of a cache data file defined for each cache.

getCacheDataFilesNumber()

Acquires the number of cache data files defined for each cache.

getRemainingAreaSizeOfWritingCacheDataFile()

Acquires the remaining space (in bytes) available in the cache data file currently being imported by the EADS server that is executing the user function.

getRemainingCacheDataFilesNumber()

Acquires the number of unused cache data files currently available to the EADS server that is executing the user function.

(4) getType()

(a) Description

This method acquires the cache types.

(b) Format

public CacheType getType()

(c) Return value

This method returns the cache types.

For details about the enumeration CacheType, see 18.2.16 Enumeration CacheType.

(5) getCacheDataFileSize()

(a) Description

This method acquires the size (in bytes) of a cache data file defined for each cache.

(b) Format

public long getCacheDataFileSize()
                          throws EADsStoreException

(c) Return value

This method returns the size of a cache data file defined for each cache.

(6) getCacheDataFilesNumber()

(a) Description

This method acquires the number of cache data files defined for each cache.

(b) Format

public int getCacheDataFilesNumber()
                            throws EADsStoreException

(c) Return value

This returns the number of cache data files defined for each cache.

(d) Exceptions

  • UserOperationException (illegal user operation)

  • EADsStoreException (unexpected error)

(7) getRemainingAreaSizeOfWritingCacheDataFile()

(a) Description

This method acquires the remaining space (in bytes) available in the cache data file currently being imported by the EADS server that is executing the user function.

(b) Format

public long getRemainingAreaSizeOfWritingCacheDataFile(int rangeId)
                                                throws EADsStoreException

(c) Parameters

rangeId

Specifies the range ID of a range that belongs to the EADS server that is executing the user function.

(d) Return value

This method returns the remaining space (in bytes) available for storing persistent data in the cache data file currently being imported.

(e) Exceptions

  • UserOperationException (illegal user operation)

  • InternalServerException (EADS server internal error)

  • EADsStoreException (unexpected error)

(f) Notes

Even when this method's return value indicates sufficient space in the cache data file, the available space on other EADS servers that handle the same range might be different because the data arrangement differs from one EADS server to another.

You can expect to reduce such a difference in the available space in the cache data files by sufficiently compacting the cache data files. However, achieving exactly same amount of free space on all the EADS servers cannot be assured.

(8) getRemainingCacheDataFilesNumber()

(a) Description

This method acquires the number of unused cache data files currently available to the EADS server that is executing the user function.

(b) Format

public int getRemainingCacheDataFilesNumber(int rangeId)
                                     throws EADsStoreException

(c) Parameters

rangeId

Specifies the range ID of a range that belongs to the EADS server that is executing the user function.

(d) Return value

This method returns the number of unused cache data files that are currently available. This value does not include the number of files reserved by the EADS server.

If the cache data file currently under import processing is the last available cache data file, the method returns 0.

(e) Exceptions

  • UserOperationException (illegal user operation)

  • InternalServerException (EADS server internal error)

  • EADsStoreException (unexpected error)

(f) Notes

Even when this method's return value indicates that there are a sufficient number of cache data files, the number of unused files on other EADS servers that handle the same range might be different because the data arrangement differs from one EADS server to another.

You can expect to achieve roughly the same number of unused files as that of the other EADS servers by sufficiently compacting the cache data files.