com.hazelcast.config
Class MaxSizeConfig

java.lang.Object
  extended by com.hazelcast.config.MaxSizeConfig
All Implemented Interfaces:
DataSerializable, Serializable
Direct Known Subclasses:
MaxSizeConfigReadOnly

public class MaxSizeConfig
extends Object
implements DataSerializable, Serializable

Configuration for map's capacity. You can set a limit for number of entries or total memory cost of entries.

See Also:
Serialized Form

Nested Class Summary
static class MaxSizeConfig.MaxSizePolicy
          Maximum Size Policy
 
Field Summary
static int DEFAULT_MAX_SIZE
          Default maximum size of map.
 
Constructor Summary
MaxSizeConfig()
           
MaxSizeConfig(int size, MaxSizeConfig.MaxSizePolicy maxSizePolicy)
           
MaxSizeConfig(MaxSizeConfig config)
           
 
Method Summary
 MaxSizeConfigReadOnly getAsReadOnly()
           
 MaxSizeConfig.MaxSizePolicy getMaxSizePolicy()
           
 int getSize()
           
 void readData(ObjectDataInput in)
          Reads fields from the input stream
 MaxSizeConfig setMaxSizePolicy(MaxSizeConfig.MaxSizePolicy maxSizePolicy)
           
 MaxSizeConfig setSize(int size)
           
 String toString()
           
 void writeData(ObjectDataOutput out)
          Writes object fields to output stream
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFAULT_MAX_SIZE

public static final int DEFAULT_MAX_SIZE
Default maximum size of map.

See Also:
Constant Field Values
Constructor Detail

MaxSizeConfig

public MaxSizeConfig()

MaxSizeConfig

public MaxSizeConfig(int size,
                     MaxSizeConfig.MaxSizePolicy maxSizePolicy)

MaxSizeConfig

public MaxSizeConfig(MaxSizeConfig config)
Method Detail

getAsReadOnly

public MaxSizeConfigReadOnly getAsReadOnly()

getSize

public int getSize()

setSize

public MaxSizeConfig setSize(int size)

getMaxSizePolicy

public MaxSizeConfig.MaxSizePolicy getMaxSizePolicy()

setMaxSizePolicy

public MaxSizeConfig setMaxSizePolicy(MaxSizeConfig.MaxSizePolicy maxSizePolicy)

writeData

public void writeData(ObjectDataOutput out)
               throws IOException
Description copied from interface: DataSerializable
Writes object fields to output stream

Specified by:
writeData in interface DataSerializable
Parameters:
out - output
Throws:
IOException

readData

public void readData(ObjectDataInput in)
              throws IOException
Description copied from interface: DataSerializable
Reads fields from the input stream

Specified by:
readData in interface DataSerializable
Parameters:
in - input
Throws:
IOException

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2015 Hazelcast, Inc.. All Rights Reserved.