com.wewebu.ow.server.util.paramcodec
Class OwAppCounterBag

java.lang.Object
  extended by com.wewebu.ow.server.util.paramcodec.OwCookieStoreCodec
      extended by com.wewebu.ow.server.util.paramcodec.OwAttributeBagCodec
          extended by com.wewebu.ow.server.util.paramcodec.OwAppCounterBag
All Implemented Interfaces:
OwParameterMapCodec

public class OwAppCounterBag
extends OwAttributeBagCodec

This class represent an application counter generator
A bag is used for the unique index storage.
The index name uniqueness is guaranteed per virtual machine.
Attribute bag access is also synchronized per virtual machine.
This class is not suitable for cluster based usage.

Alfresco Workdesk
Copyright (c) Alfresco Software, Inc.
All rights reserved.

For licensing information read the license.txt file or
go to: http://wiki.alfresco.com

Since:
3.0.0.0
See Also:
OwAttributeBag, OwAttributeBagWriteable

Nested Class Summary
 
Nested classes/interfaces inherited from class com.wewebu.ow.server.util.paramcodec.OwCookieStoreCodec
OwCookieStoreCodec.OwTimedCookie, OwCookieStoreCodec.OwTimedCookieValue
 
Field Summary
 
Fields inherited from class com.wewebu.ow.server.util.paramcodec.OwAttributeBagCodec
CONFIGURATION_ATTRIBUTEBAGS_ELEMENT, CONFIGURATION_CODEC_PREFIX_ATTRIBUTE, CONFIGURATION_COOKIE_PREFIX_ATTRIBUTE, CONFIGURATION_USER_ATTRIBUTE, DEFAULT_CODEC_BAGS_PREFIX, DEFAULT_CONFIG_BAG_USER_NAME, DEFAULT_COOKIE_BAGS_PREFIX
 
Fields inherited from class com.wewebu.ow.server.util.paramcodec.OwCookieStoreCodec
CONFIGURATION_BOOTSTRAP_ELEMENT_NAME, CONFIGURATION_DAYS_ATTRIBUTE, CONFIGURATION_HOURS_ATTRIBUTE, CONFIGURATION_MINUTES_ATTRIBUTE, CONFIGURATION_NAME_ATTRIBUTE, CONFIGURATION_SECONDS_ATTRIBUTE, CONFIGURATION_URL_LIFE_TIME_ELEMENT, CONFIGURATION_URL_PARAMETER_ELEMENT, DEFAULT_CONFIG_URL_LIFE_TIME, DEFAULT_URL_PARAMETER_NAME
 
Constructor Summary
OwAppCounterBag(OwNetwork network_p)
          Constructor
 
Method Summary
protected  OwAttributeBagWriteable getBag(String bagName_p, boolean create_p)
          Get the bag from the network
protected  long getInitialValueForIndex()
          Get the start value for index.
protected  String masterBagName()
          Get the name for the master bag.
 
Methods inherited from class com.wewebu.ow.server.util.paramcodec.OwAttributeBagCodec
addCookieValue, cookieBagName, cookieTableBagName, createTimedCookieCollectList, getCookieBag, getCookieTableBag, getCookieValue, getMasterBag, getNextUnqiueNameIndex, loadAttributeBagsConfiguation, remove
 
Methods inherited from class com.wewebu.ow.server.util.paramcodec.OwCookieStoreCodec
canDecode, collectExpiredNames, createCookie, decode, encode, loadUrlLifeTimeConfig, loadUrlParameterConfig
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OwAppCounterBag

public OwAppCounterBag(OwNetwork network_p)
Constructor

Method Detail

getBag

protected OwAttributeBagWriteable getBag(String bagName_p,
                                         boolean create_p)
                                  throws Exception
Get the bag from the network

Specified by:
getBag in class OwAttributeBagCodec
Parameters:
bagName_p - - the name of the bag
create_p - if true the given bag should be created if not found
Returns:
the bag with the given name
Throws:
Exception

getInitialValueForIndex

protected long getInitialValueForIndex()
Description copied from class: OwAttributeBagCodec
Get the start value for index.

Overrides:
getInitialValueForIndex in class OwAttributeBagCodec
Returns:
- the start value for index, used in case the attribute bag has no value set.

masterBagName

protected String masterBagName()
Get the name for the master bag.

Overrides:
masterBagName in class OwAttributeBagCodec
Returns:
the master bag name


Copyright © 2013 Alfresco Business Solutions. All Rights Reserved.